]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Prevent strange "section mentioned in a -j option but not found"
authorAlan Modra <amodra@gmail.com>
Mon, 27 Jul 2020 07:57:23 +0000 (17:27 +0930)
committerAlan Modra <amodra@gmail.com>
Mon, 27 Jul 2020 13:01:37 +0000 (22:31 +0930)
"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.

binutils/ChangeLog
binutils/objdump.c

index 68b8b2c1ed8af704925fdcc64bcfb9e6a0c555b1..2522808763a44ce835298c2bc385702af4d84569 100644 (file)
@@ -1,3 +1,8 @@
+2020-07-27  Alan Modra  <amodra@gmail.com>
+
+       * objdump.c (dump_section): Don't return without calling
+       process_section_p.
+
 2020-07-27  H.J. Lu  <hongjiu.lu@intel.com>
 
        * doc/binutils.texi: Replace preceeded with preceded.
index 978d86cb1fd0ccc34839928c05bd98ce3264b721..79ef05185637ecddbe0514c17ae34699ebddc8db 100644 (file)
@@ -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)