diff options
Diffstat (limited to 'binutils')
-rw-r--r-- | binutils/ChangeLog | 6 | ||||
-rw-r--r-- | binutils/objdump.c | 7 |
2 files changed, 13 insertions, 0 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog index 222ea7a..a7fd431 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -1,3 +1,9 @@ +2020-02-02 H.J. Lu <hongjiu.lu@intel.com> + + PR gas/25380 + * objdump.c (sym_ok): Return FALSE if 2 sections are in the + same file with different section pointers. + 2020-02-01 Nick Clifton <nickc@redhat.com> * README-how-to-make-a-release: Update with more details on the diff --git a/binutils/objdump.c b/binutils/objdump.c index 60a3967..17c0637 100644 --- a/binutils/objdump.c +++ b/binutils/objdump.c @@ -1065,6 +1065,13 @@ sym_ok (bfd_boolean want_section, { if (want_section) { + /* NB: An object file can have different sections with the same + section name. Compare compare section pointers if they have + the same owner. */ + if (sorted_syms[place]->section->owner == sec->owner + && sorted_syms[place]->section != sec) + return FALSE; + /* Note - we cannot just compare section pointers because they could be different, but the same... Ie the symbol that we are trying to find could have come from a separate debug info file. Under such |