From 94585d6d4495a001dd5023f728150c96d5740ba8 Mon Sep 17 00:00:00 2001 From: Nick Clifton Date: Fri, 20 May 2022 16:55:36 +0100 Subject: 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/dwarf.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'binutils/dwarf.h') diff --git a/binutils/dwarf.h b/binutils/dwarf.h index ccce246..040e674 100644 --- a/binutils/dwarf.h +++ b/binutils/dwarf.h @@ -250,8 +250,8 @@ extern void *open_debug_file (const char *); extern void free_debug_memory (void); -extern void dwarf_select_sections_by_names (const char *); -extern void dwarf_select_sections_by_letters (const char *); +extern int dwarf_select_sections_by_names (const char *); +extern int dwarf_select_sections_by_letters (const char *); extern void dwarf_select_sections_all (void); extern unsigned int * find_cu_tu_set (void *, unsigned int); -- cgit v1.1