From c46b706620eb9b27fa06e26406ffa4f79d9292e6 Mon Sep 17 00:00:00 2001 From: Nick Clifton Date: Fri, 12 Feb 2021 14:52:22 +0000 Subject: Change the readelf and objdump programs so that they will automatically follow links to separate debug info files. * configure.ac (follow-debug-links): Add option to enable or disable the following of debug links by default. Set the default for the option to be 'follow'. * dwarf.c (do_follow_links): Initialise with DEFAULT_FOR_FOLLOW_LINKS. (dwarf_select_sections_by_names): Add no-follow-links option. (dwarf_select_sections_by_letter): Add 'N' option. * objdump.c (usage): Add conditional text describing the follow links option. (slurp_symtab): Ensure that there is a NULL entry at the end of the symbol table. (slurp_dynamic_symtab): Likewise. (dump_bfd): When extending the symbol table, ensure that there is still a NULL entry at the end. * readelf.c (usage): Add conditional text describing the follow links option. * doc/binutils.texi: Update documentation for objcopy and readelf. * doc/debug.options.texi: Update documentation of the follow-links option. * config.in: Regenerate. * configure: Regenerate. * testsuite/binutils-all/compress.exp: Add the -WN option to objdump command lines that are not expecting to follow links. * testsuite/binutils-all/readelf.exp: Add the --debug-dump=no-follow-links option to tests that are not expecting to follow debug links. gas * testsuite/gas/mach-o/sections-1.d: Stop automatic debug link following. * testsuite/gas/xgate/insns-dwarf2.d: Likewise. ld * testsuite/ld-elf/sec64k.exp: Stop readelf from automatically following debug links. --- gas/ChangeLog | 6 ++++++ gas/testsuite/gas/mach-o/sections-1.d | 2 +- gas/testsuite/gas/xgate/insns-dwarf2.d | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) (limited to 'gas') diff --git a/gas/ChangeLog b/gas/ChangeLog index 6e70129..d21ff55 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,9 @@ +2021-02-12 Nick Clifton + + * testsuite/gas/mach-o/sections-1.d: Stop automatic debug link + following. + * testsuite/gas/xgate/insns-dwarf2.d: Likewise. + 2021-02-12 Alan Modra * testsuite/gas/all/pr27381.err: Don't match source file name. diff --git a/gas/testsuite/gas/mach-o/sections-1.d b/gas/testsuite/gas/mach-o/sections-1.d index 5b8a8fa..cf76769 100644 --- a/gas/testsuite/gas/mach-o/sections-1.d +++ b/gas/testsuite/gas/mach-o/sections-1.d @@ -1,4 +1,4 @@ -#objdump: -P section +#objdump: -P section -WN .*: +file format mach-o.* #... Section: __text __TEXT \(bfdname: .text\) diff --git a/gas/testsuite/gas/xgate/insns-dwarf2.d b/gas/testsuite/gas/xgate/insns-dwarf2.d index 3a8e699..fd658a6 100644 --- a/gas/testsuite/gas/xgate/insns-dwarf2.d +++ b/gas/testsuite/gas/xgate/insns-dwarf2.d @@ -1,4 +1,4 @@ -#objdump: -S +#objdump: -S -WN #as: -gdwarf2 #name: Dwarf2 test on insns.s #source: insns.s -- cgit v1.1