Stop readekf and objdump from aggressively following links.
authorNick Clifton <nickc@redhat.com>
Fri, 20 May 2022 15:55:36 +0000 (16:55 +0100)
committerNick Clifton <nickc@redhat.com>
Fri, 20 May 2022 15:55:36 +0000 (16:55 +0100)
commit94585d6d4495a001dd5023f728150c96d5740ba8
treee2ae934b5864bda0281b1dbf39e153018256451c
parent9ecdcd1be1e8487fca035c588d17a102d1f8b5eb
Stop readekf and objdump from aggressively following links.

* dwarf.c (dwarf_select_sections_by_names): Return zero if no
sections were selected.
(dwarf_select_sections_by_letters): Likewise.
* dwarf.h: (dwarf_select_sections_by_names): Update prototype.
(dwarf_select_sections_by_letters): Update prototype.
* objdump.c (might_need_separate_debug_info): New function.
(dump_bfd): Call new function before attempting to load separate
debug info files.
(main): Do not enable dwarf section dumping for -WK or -WN.
* readelf.c (parse_args): Do not enable dwarf section dumping for
-wK or -wN.
(might_need_separate_debug_info): New function.
(process_object): Call new function before attempting to load
separate debug info files.
* testsuite/binutils-all/debuginfo.exp: Expect -WE and -wE
debuginfod tests to pass.
* testsuite/binutils-all/objdump.Wk: Add extra regexps.
* testsuite/binutils-all/readelf.k: Add extra regexps.
binutils/ChangeLog
binutils/dwarf.c
binutils/dwarf.h
binutils/objdump.c
binutils/readelf.c
binutils/testsuite/binutils-all/debuginfod.exp
binutils/testsuite/binutils-all/objdump.Wk
binutils/testsuite/binutils-all/readelf.k