summaryrefslogtreecommitdiff
path: root/binutils
diff options
context:
space:
mode:
authorAndreas Schwab <schwab@linux-m68k.org>1999-05-27 03:02:23 +0000
committerAndreas Schwab <schwab@linux-m68k.org>1999-05-27 03:02:23 +0000
commit12131ffe9d2e5c65db534444a3d4d4339dba5d3f (patch)
treeab6691736b5c035559673d9890624c2f6607e521 /binutils
parentc0a91d0a619250703b8633826a3723c961da66ab (diff)
downloadbinutils-redhat-12131ffe9d2e5c65db534444a3d4d4339dba5d3f.tar.gz
* readelf.c (dump_relocations): Always print the addend on RELA
systems even if there is no symbol. (process_program_headers): Reset dynamic_size before looping through the program headers. (process_version_sections): Cast sh_offset to unsigned long for printing in case bfd_vma is wider. (process_symbol_table): Use get_symbol_index_type when printing st_shndx.
Diffstat (limited to 'binutils')
-rw-r--r--binutils/ChangeLog11
-rw-r--r--binutils/readelf.c18
2 files changed, 18 insertions, 11 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index 1b1121cea0..746baf1f67 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -1,3 +1,14 @@
+Thu May 27 11:58:33 1999 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
+
+ * readelf.c (dump_relocations): Always print the addend on RELA
+ systems even if there is no symbol.
+ (process_program_headers): Reset dynamic_size before looping
+ through the program headers.
+ (process_version_sections): Cast sh_offset to unsigned long for
+ printing in case bfd_vma is wider.
+ (process_symbol_table): Use get_symbol_index_type when printing
+ st_shndx.
+
1999-05-17 DJ Delorie <dj@cygnus.com>
* windres.c: add verbose option
diff --git a/binutils/readelf.c b/binutils/readelf.c
index b0d3d5505b..c2d14869a0 100644
--- a/binutils/readelf.c
+++ b/binutils/readelf.c
@@ -555,6 +555,8 @@ dump_relocations (file, rel_offset, rel_size, symtab, strtab)
if (is_rela)
printf (" + %lx", (unsigned long) relas [i].r_addend);
}
+ else if (is_rela)
+ printf ("%34c%lx", ' ', (unsigned long) relas[i].r_addend);
putchar ('\n');
}
@@ -1495,6 +1497,7 @@ process_program_headers (file)
loadaddr = -1;
dynamic_addr = 0;
+ dynamic_size = 0;
for (i = 0, segment = program_headers;
i < elf_header.e_phnum;
@@ -2507,7 +2510,7 @@ process_version_sections (file)
printf (_(" Addr: 0x"));
printf_vma (section->sh_addr);
printf (_(" Offset: %#08lx Link: %lx (%s)\n"),
- section->sh_offset, section->sh_link,
+ (unsigned long) section->sh_offset, section->sh_link,
SECTION_NAME (section_headers + section->sh_link));
GET_DATA_ALLOC (section->sh_offset, section->sh_size,
@@ -2595,7 +2598,7 @@ process_version_sections (file)
printf (_(" Addr: 0x"));
printf_vma (section->sh_addr);
printf (_(" Offset: %#08lx Link to section: %ld (%s)\n"),
- section->sh_offset, section->sh_link,
+ (unsigned long) section->sh_offset, section->sh_link,
SECTION_NAME (section_headers + section->sh_link));
GET_DATA_ALLOC (section->sh_offset, section->sh_size,
@@ -2696,7 +2699,7 @@ process_version_sections (file)
printf (_(" Addr: "));
printf_vma (section->sh_addr);
printf (_(" Offset: %#08lx Link: %lx (%s)\n"),
- section->sh_offset, section->sh_link,
+ (unsigned long) section->sh_offset, section->sh_link,
SECTION_NAME (link_section));
GET_DATA_ALLOC (version_info [DT_VERSIONTAGIDX (DT_VERSYM)]
@@ -3200,14 +3203,7 @@ process_symbol_table (file)
get_symbol_binding (ELF_ST_BIND (psym->st_info)),
psym->st_other);
- if (psym->st_shndx == 0)
- fputs (" UND", stdout);
- else if ((psym->st_shndx & 0xffff) == 0xfff1)
- fputs (" ABS", stdout);
- else if ((psym->st_shndx & 0xffff) == 0xfff2)
- fputs (" COM", stdout);
- else
- printf ("%4x", psym->st_shndx);
+ printf ("%4s", get_symbol_index_type (psym->st_shndx));
printf (" %s", strtab + psym->st_name);