* objdump.c (disassemble_section): Don't disassemble sections
authorAlan Modra <amodra@gmail.com>
Sat, 24 Apr 2004 12:39:47 +0000 (12:39 +0000)
committerAlan Modra <amodra@gmail.com>
Sat, 24 Apr 2004 12:39:47 +0000 (12:39 +0000)
without SEC_HAS_CONTENTS.

binutils/ChangeLog
binutils/objdump.c

index e654faad9a1133b01fdb37a4e8b5cb030ba137f9..55d9ec08c9b299a13737731d036e86e188bf9957 100644 (file)
@@ -1,3 +1,8 @@
+2004-04-24  Alan Modra  <amodra@bigpond.net.au>
+
+       * objdump.c (disassemble_section): Don't disassemble sections
+       without SEC_HAS_CONTENTS.
+
 2004-04-22  Jakub Jelinek  <jakub@redhat.com>
 
        * objdump.c (synthsyms, synthcount): New variables.
index 1b89fa96489d6d4e2b0c56f269d306baf815f13f..c3982e1e9093d83fd70243cac7767762f07b8062 100644 (file)
@@ -1572,7 +1572,8 @@ disassemble_section (bfd *abfd, asection *section, void *info)
      code are not normally disassembled.  */
   if (! disassemble_all
       && only == NULL
-      && (section->flags & SEC_CODE) == 0)
+      && ((section->flags & (SEC_CODE | SEC_HAS_CONTENTS))
+         != (SEC_CODE | SEC_HAS_CONTENTS)))
     return;
 
   if (! process_section_p (section))