From: Alan Modra Date: Mon, 27 Jul 2020 07:57:23 +0000 (+0930) Subject: Prevent strange "section mentioned in a -j option but not found" X-Git-Tag: gdb-10-branchpoint~521 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8fab9282e5d231faa9105eb48eca9c3d4d990c93;p=thirdparty%2Fbinutils-gdb.git Prevent strange "section mentioned in a -j option but not found" "objdump -s -j .bss" results in a message that indicates objdump couldn't find a .bss section when present. Fix that. * objdump.c (dump_section): Don't return without calling process_section_p. --- diff --git a/binutils/ChangeLog b/binutils/ChangeLog index 68b8b2c1ed8..2522808763a 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -1,3 +1,8 @@ +2020-07-27 Alan Modra + + * objdump.c (dump_section): Don't return without calling + process_section_p. + 2020-07-27 H.J. Lu * doc/binutils.texi: Replace preceeded with preceded. diff --git a/binutils/objdump.c b/binutils/objdump.c index 978d86cb1fd..79ef0518563 100644 --- a/binutils/objdump.c +++ b/binutils/objdump.c @@ -4283,10 +4283,10 @@ dump_section (bfd *abfd, asection *section, void *dummy ATTRIBUTE_UNUSED) int count; int width; - if ((section->flags & SEC_HAS_CONTENTS) == 0) + if (! process_section_p (section)) return; - if (! process_section_p (section)) + if ((section->flags & SEC_HAS_CONTENTS) == 0) return; if ((datasize = bfd_section_size (section)) == 0)