Extend objdump's --dwarf=follow-links option so that separate debug info files will...
authorNick Clifton <nickc@redhat.com>
Mon, 25 Feb 2019 12:15:41 +0000 (12:15 +0000)
committerNick Clifton <nickc@redhat.com>
Mon, 25 Feb 2019 12:15:41 +0000 (12:15 +0000)
commit39f0547e554df96608dd041d2a7b3c72882fd515
tree53ca1f928e75345d1a9e3a409ef95ef9a2175304
parent60245a92ce2c16d0b43987c2442b1a125652b832
Extend objdump's --dwarf=follow-links option so that separate debug info files will also be affected by other dump function, and symbol tables from separate debug info files will be used when disassembling the main file.

* objdump.c (sym_ok): New function.
(find_symbol_for_address): Use new function.
(disassemble_section): Compare sections by name, not pointer.
(dump_dwarf): Move code to initialise byte_get pointer and iterate
over separate debug files from here to ...
(dump_bfd): ... here.  Add parameter indicating that a separate
debug info file is being dumped.  For main file, pull in the
symbol tables from all separate debug info files.
(display_object): Update call to dump_bfd.
* doc/binutils.texi: Document extened behaviour of the
--dwarf=follow-links option.
* NEWS: Mention this new feature.
* testsuite/binutils-all/objdump.WK2: Update expected output.
* testsuite/binutils-all/objdump.exp (test_follow_debuglink): Add
options and dump file parameters.
Add extra test.
* testsuite/binutils-all/objdump.WK3: New file.
* testsuite/binutils-all/readelf.exp: Change expected output for
readelf -wKis test.
* testsuite/binutils-all/readelf.wKis: New file.
13 files changed:
binutils/ChangeLog
binutils/NEWS
binutils/doc/binutils.texi
binutils/dwarf.c
binutils/dwarf.h
binutils/objdump.c
binutils/testsuite/binutils-all/debuglink.s
binutils/testsuite/binutils-all/linkdebug.s
binutils/testsuite/binutils-all/objdump.WK2
binutils/testsuite/binutils-all/objdump.WK3 [new file with mode: 0644]
binutils/testsuite/binutils-all/objdump.exp
binutils/testsuite/binutils-all/readelf.exp
binutils/testsuite/binutils-all/readelf.wKis [new file with mode: 0644]