This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
objdump won't always disassmble a section
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: binutils at sourceware dot org
- Date: Tue, 13 Jan 2009 00:38:49 +1030
- Subject: objdump won't always disassmble a section
objdump --disassemble decides to dump an area as data if there is
an object symbol at the address. This happens even when the symbol
is from a different section, which can occur with overlays.
binutils/
* objdump.c (disassemble_section): Don't assume non-instruction
data if object symbol at given address is in different section.
Index: binutils/objdump.c
===================================================================
RCS file: /cvs/src/src/binutils/objdump.c,v
retrieving revision 1.150
diff -u -p -r1.150 objdump.c
--- binutils/objdump.c 23 Dec 2008 09:01:46 -0000 1.150
+++ binutils/objdump.c 12 Jan 2009 13:19:03 -0000
@@ -1903,6 +1903,7 @@ disassemble_section (bfd *abfd, asection
disassembling them. */
if (disassemble_all
|| sym == NULL
+ || sym->section != section
|| bfd_asymbol_value (sym) > addr
|| ((sym->flags & BSF_OBJECT) == 0
&& (strstr (bfd_asymbol_name (sym), "gnu_compiled")
--
Alan Modra
Australia Development Lab, IBM