From f1e2bc6264213b0679d7cad53e7a3118fd64e102 Mon Sep 17 00:00:00 2001 From: Nick Clifton Date: Thu, 24 Jul 2003 14:06:07 +0000 Subject: 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. --- binutils/ChangeLog | 4 ++++ binutils/objdump.c | 12 ++++++------ 2 files changed, 10 insertions(+), 6 deletions(-) (limited to 'binutils') diff --git a/binutils/ChangeLog b/binutils/ChangeLog index 28fed57..cf176a5 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -1,5 +1,9 @@ 2003-07-24 Nick Clifton + * objdump.c (disassemble_data): 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. + * po/fr.po: Updated French translation. 2003-07-23 Nick Clifton diff --git a/binutils/objdump.c b/binutils/objdump.c index 8011b58..ca5f6db 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); -- cgit v1.1