summaryrefslogtreecommitdiff
path: root/binutils/configure.ac
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2021-02-12 14:52:22 +0000
committerNick Clifton <nickc@redhat.com>2021-02-12 14:52:22 +0000
commitc46b706620eb9b27fa06e26406ffa4f79d9292e6 (patch)
tree0ec6f7bf04f8c7d05eb71ec5698d847a09777965 /binutils/configure.ac
parent96df3e28b835ccb5804bcca96f417761e5e8be67 (diff)
downloadbinutils-gdb-c46b706620eb9b27fa06e26406ffa4f79d9292e6.tar.gz
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.
Diffstat (limited to 'binutils/configure.ac')
-rw-r--r--binutils/configure.ac14
1 files changed, 14 insertions, 0 deletions
diff --git a/binutils/configure.ac b/binutils/configure.ac
index 6ab85466370..af24c0c9a8a 100644
--- a/binutils/configure.ac
+++ b/binutils/configure.ac
@@ -82,6 +82,20 @@ fi], [default_f_for_ifunc=0])
AC_DEFINE_UNQUOTED(DEFAULT_F_FOR_IFUNC_SYMBOLS, $default_f_for_ifunc,
[Have nm use F and f for global and local ifunc symbols])
+
+AC_ARG_ENABLE(follow-debug-links,
+[AS_HELP_STRING([--enable-follow-debug-links],
+ [Have readelf and objdump follow debug links by default])], [
+if test "${enableval}" = no; then
+ default_for_follow_links=0
+else
+ default_for_follow_links=1
+fi], [default_for_follow_links=1])
+
+AC_DEFINE_UNQUOTED(DEFAULT_FOR_FOLLOW_LINKS, $default_for_follow_links,
+ [Have readelf and objdump follow debug links by default])
+
+
AC_DEBUGINFOD
GCC_ENABLE([libctf], [yes], [], [Handle .ctf type-info sections])