summaryrefslogtreecommitdiffstats
path: root/binutils/objdump.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2003-07-24 14:06:07 +0000
committerNick Clifton <nickc@redhat.com>2003-07-24 14:06:07 +0000
commitf1e2bc6264213b0679d7cad53e7a3118fd64e102 (patch)
treea14d2fd662f49cfc81317eb01f4bda772888e6be /binutils/objdump.c
parent3d85aebe2a3ef941447f4d5cd996fce87da26933 (diff)
downloadppe42-binutils-f1e2bc6264213b0679d7cad53e7a3118fd64e102.tar.gz
ppe42-binutils-f1e2bc6264213b0679d7cad53e7a3118fd64e102.zip
Do not ignore sections without the LOAD flag when disassemble_all is true.
Only print a message about disassembling a section if it contains some data.
Diffstat (limited to 'binutils/objdump.c')
-rw-r--r--binutils/objdump.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/binutils/objdump.c b/binutils/objdump.c
index 8011b588a2..ca5f6dbc23 100644
--- a/binutils/objdump.c
+++ b/binutils/objdump.c
@@ -1628,10 +1628,10 @@ disassemble_data (abfd)
asymbol *sym = NULL;
long place = 0;
- if ((section->flags & SEC_LOAD) == 0
- || (! disassemble_all
- && only == NULL
- && (section->flags & SEC_CODE) == 0))
+ /* Sections that do not contain machine code are not normally disassembled. */
+ if (! disassemble_all
+ && only == NULL
+ && (section->flags & SEC_CODE) == 0)
continue;
if (only != NULL)
@@ -1682,12 +1682,12 @@ disassemble_data (abfd)
}
}
- printf (_("Disassembly of section %s:\n"), section->name);
-
datasize = bfd_get_section_size_before_reloc (section);
if (datasize == 0)
continue;
+ printf (_("Disassembly of section %s:\n"), section->name);
+
data = (bfd_byte *) xmalloc ((size_t) datasize);
bfd_get_section_contents (abfd, section, data, 0, datasize);
OpenPOWER on IntegriCloud