From d6bfbc398158eaa381b08c7cf7b943ac4085d4a6 Mon Sep 17 00:00:00 2001 From: Nick Clifton Date: Tue, 16 Mar 2021 16:39:46 +0000 Subject: [PATCH] Re-enable the dislay of debug sections in separate debuginfo files without the need for -P. PR 27533 * readelf.c (process_section_contents): Only dump debug information for separate files unless process_links is enabled. (process_object): Always call process_section_contents for separate info files. --- binutils/ChangeLog | 8 ++++++++ binutils/readelf.c | 7 +++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/binutils/ChangeLog b/binutils/ChangeLog index 62f98b4cda0..e9a78ee5567 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -1,3 +1,11 @@ +2021-03-16 Nick Clifton + + PR 27533 + * readelf.c (process_section_contents): Only dump debug + information for separate files unless process_links is enabled. + (process_object): Always call process_section_contents for + separate info files. + 2021-03-15 Nick Clifton PR 27487 diff --git a/binutils/readelf.c b/binutils/readelf.c index 1994eebd910..2205ba1b8d6 100644 --- a/binutils/readelf.c +++ b/binutils/readelf.c @@ -15509,6 +15509,9 @@ process_section_contents (Filedata * filedata) { dump_type dump = filedata->dump.dump_sects[i]; + if (filedata->is_separate && ! process_links) + dump &= DEBUG_DUMP; + #ifdef SUPPORT_DISASSEMBLY if (dump & DISASS_DUMP) { @@ -21222,10 +21225,10 @@ process_object (Filedata * filedata) res = FALSE; else if (! process_section_headers (d->handle)) res = FALSE; + else if (! process_section_contents (d->handle)) + res = FALSE; else if (process_links) { - if (! process_section_contents (d->handle)) - res = FALSE; if (! process_section_groups (d->handle)) res = FALSE; if (! process_program_headers (d->handle)) -- 2.30.2