diff options
Diffstat (limited to 'binutils/readelf.c')
-rw-r--r-- | binutils/readelf.c | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/binutils/readelf.c b/binutils/readelf.c index 2fcd582..e6f2be6 100644 --- a/binutils/readelf.c +++ b/binutils/readelf.c @@ -13442,7 +13442,7 @@ process_archive (char * file_name, FILE * file, bfd_boolean is_thin_archive) unsigned long current_pos; printf (_("Index of archive %s: (%ld entries, 0x%lx bytes in the symbol table)\n"), - file_name, arch.index_num, arch.sym_size); + file_name, (long) arch.index_num, arch.sym_size); current_pos = ftell (file); for (i = l = 0; i < arch.index_num; i++) @@ -13459,8 +13459,9 @@ process_archive (char * file_name, FILE * file, bfd_boolean is_thin_archive) if (qualified_name != NULL) { - printf (_("Binary %s at offset 0x%lx contains:\n"), - qualified_name, arch.index_array[i]); + printf (_("Contents of binary %s at offset "), qualified_name); + (void) print_vma (arch.index_array[i], PREFIX_HEX); + putchar ('\n'); free (qualified_name); } } @@ -13476,11 +13477,14 @@ process_archive (char * file_name, FILE * file, bfd_boolean is_thin_archive) l += strlen (arch.sym_table + l) + 1; } - if (l & 01) - ++l; + if (arch.uses_64bit_indicies) + l = (l + 7) & ~ 7; + else + l += l & 1; + if (l < arch.sym_size) - error (_("%s: symbols remain in the index symbol table, but without corresponding entries in the index table\n"), - file_name); + error (_("%s: %ld bytes remain in the symbol table, but without corresponding entries in the index table\n"), + file_name, arch.sym_size - l); if (fseek (file, current_pos, SEEK_SET) != 0) { |