OSDN Git Service

* objdump.c (disassemble_section): Don't disassemble sections
authoramodra <amodra>
Sat, 24 Apr 2004 12:39:47 +0000 (12:39 +0000)
committeramodra <amodra>
Sat, 24 Apr 2004 12:39:47 +0000 (12:39 +0000)
without SEC_HAS_CONTENTS.

binutils/ChangeLog
binutils/objdump.c

index e654faa..55d9ec0 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 1b89fa9..c3982e1 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))