Don't store the size of the symbol. (elf_parser_lookup_symbol): Look it up

Fri Feb  9 16:16:34 2007  Søren Sandmann  <sandmann@redhat.com>

       * elfparser.c (struct ElfSym): Don't store the size of the symbol.
       (elf_parser_lookup_symbol): Look it up here instaed.

       * binfile.c (bin_file_free): Use pre-decrement instead of
       post-decrement.
       (bin_file_check_inode): Clarify the warning a little


svn path=/trunk/; revision=349
This commit is contained in:
Søren Sandmann
2007-02-09 21:30:01 +00:00
committed by Søren Sandmann Pedersen
parent e8c2a59906
commit c1025c6b44
4 changed files with 26 additions and 11 deletions

View File

@ -269,7 +269,6 @@ bin_file_new (const char *filename)
else
{
bf->elf = elf_parser_new (filename, NULL);
#if 0
if (!bf->elf)
g_print ("Could not parse file %s\n", filename);
@ -313,7 +312,7 @@ bin_file_new (const char *filename)
void
bin_file_free (BinFile *bin_file)
{
if (bin_file->ref_count-- == 0)
if (--bin_file->ref_count == 0)
{
g_hash_table_remove (bin_files, bin_file->filename);
@ -364,8 +363,8 @@ bin_file_lookup_symbol (BinFile *bin_file,
}
gboolean
bin_file_check_inode (BinFile *bin_file,
ino_t inode)
bin_file_check_inode (BinFile *bin_file,
ino_t inode)
{
if (bin_file->inode == inode)
return TRUE;
@ -375,7 +374,7 @@ bin_file_check_inode (BinFile *bin_file,
if (!bin_file->inode_check)
{
g_print ("warning: %s has inode %lld. It should be %lld\n",
g_print ("warning: Inode mismatch for %s (disk: %lld, memory: %lld)\n",
bin_file->filename,
(guint64)bin_file->inode, (guint64)inode);