This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: PATCH: PR binutils/4756: addr2line fails on relocatable linux kernel
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: "H.J. Lu" <hjl at lucon dot org>
- Cc: binutils at sources dot redhat dot com
- Date: Tue, 10 Jul 2007 23:21:08 +0930
- Subject: Re: PATCH: PR binutils/4756: addr2line fails on relocatable linux kernel
- References: <20070709184340.GA14140@lucon.org>
On Mon, Jul 09, 2007 at 11:43:40AM -0700, H.J. Lu wrote:
> the same check in binutils/objdump.c.
Hmm, which needs correcting like objcopy PR 4716 fix.
* objdump.c (dump_dwarf): Correct setting of is_relocatable.
Index: binutils/objdump.c
===================================================================
RCS file: /cvs/src/src/binutils/objdump.c,v
retrieving revision 1.131
diff -u -p -r1.131 objdump.c
--- binutils/objdump.c 5 Jul 2007 16:54:45 -0000 1.131
+++ binutils/objdump.c 10 Jul 2007 13:46:28 -0000
@@ -2166,8 +2166,7 @@ check_mach_o_dwarf (bfd *abfd)
static void
dump_dwarf (bfd *abfd)
{
- is_relocatable = ((abfd->flags & (HAS_RELOC | EXEC_P | DYNAMIC))
- == HAS_RELOC);
+ is_relocatable = (abfd->flags & (EXEC_P | DYNAMIC)) == 0;
/* FIXME: bfd_get_arch_size may return -1. We assume that 64bit
targets will return 64. */
--
Alan Modra
Australia Development Lab, IBM