diff options
author | Nick Clifton <nickc@redhat.com> | 2007-03-13 17:17:15 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2007-03-13 17:17:15 +0000 |
commit | 35d9dd2fb8ba23282114af75003ff0c2bee9661a (patch) | |
tree | d1ac284d60396ab0b857ff1244edce7581e31f63 /binutils | |
parent | 348473d521cdd873312796f2753862d118c1ac99 (diff) | |
download | gdb-35d9dd2fb8ba23282114af75003ff0c2bee9661a.zip gdb-35d9dd2fb8ba23282114af75003ff0c2bee9661a.tar.gz gdb-35d9dd2fb8ba23282114af75003ff0c2bee9661a.tar.bz2 |
* readelf.c (dump_section): Also test for SHT_REL sections when producing
the warning about unapplied relocs.
Diffstat (limited to 'binutils')
-rw-r--r-- | binutils/ChangeLog | 5 | ||||
-rw-r--r-- | binutils/readelf.c | 4 |
2 files changed, 7 insertions, 2 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog index 361d7fd..ccbd2b9 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -1,3 +1,8 @@ +2007-03-13 Nick Clifton <nickc@redhat.com> + + * readelf.c (dump_section): Also test for SHT_REL sections when + producing the warning about unapplied relocs. + 2007-03-07 Joseph Myers <joseph@codesourcery.com> * configure.in (REPORT_BUGS_TEXI): Define to Texinfo version of diff --git a/binutils/readelf.c b/binutils/readelf.c index 6d8f07f..4cde91b 100644 --- a/binutils/readelf.c +++ b/binutils/readelf.c @@ -1788,7 +1788,7 @@ get_machine_name (unsigned e_machine) case EM_XC16X: return "Infineon Technologies xc16x"; case EM_CYGNUS_MEP: return "Toshiba MeP Media Engine"; default: - snprintf (buff, sizeof (buff), _("<unknown>: %x"), e_machine); + snprintf (buff, sizeof (buff), _("<unknown>: 0x%x"), e_machine); return buff; } } @@ -7697,7 +7697,7 @@ dump_section (Elf_Internal_Shdr *section, FILE *file) relsec < section_headers + elf_header.e_shnum; ++relsec) { - if (relsec->sh_type != SHT_RELA + if ((relsec->sh_type != SHT_RELA && relsec->sh_type != SHT_REL) || SECTION_HEADER_INDEX (relsec->sh_info) >= elf_header.e_shnum || SECTION_HEADER (relsec->sh_info) != section || relsec->sh_size == 0 |