public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* PATCH: PR binutils/4756: addr2line fails on relocatable linux  kernel
@ 2007-07-09 18:56 H.J. Lu
  2007-07-09 19:52 ` Daniel Jacobowitz
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: H.J. Lu @ 2007-07-09 18:56 UTC (permalink / raw)
  To: binutils

bfd_simple_get_relocated_section_content shouldn't apply relocations
on executable and shared library with relocations. This patch uses
the same check in binutils/objdump.c.


H.J.
---
2007-07-09  H.J. Lu  <hongjiu.lu@intel.com>

	PR binutils/4756
	* simple.c (bfd_simple_get_relocated_section_content): Don't
	apply relocation on executable and shared library.

--- bfd/simple.c.reloc	2007-07-03 10:51:13.000000000 -0700
+++ bfd/simple.c	2007-07-09 11:28:26.000000000 -0700
@@ -162,7 +162,8 @@ bfd_simple_get_relocated_section_content
   int storage_needed;
   void *saved_offsets;
 
-  if (! (sec->flags & SEC_RELOC))
+  if ((abfd->flags & (HAS_RELOC | EXEC_P | DYNAMIC)) != HAS_RELOC
+      || ! (sec->flags & SEC_RELOC))
     {
       bfd_size_type amt = sec->rawsize > sec->size ? sec->rawsize : sec->size;
       bfd_size_type size = sec->rawsize ? sec->rawsize : sec->size;

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2007-07-10 14:57 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-07-09 18:56 PATCH: PR binutils/4756: addr2line fails on relocatable linux kernel H.J. Lu
2007-07-09 19:52 ` Daniel Jacobowitz
2007-07-09 20:00   ` H.J. Lu
2007-07-09 21:30     ` Daniel Jacobowitz
2007-07-10 10:55 ` Nick Clifton
2007-07-10 14:05 ` Alan Modra
2007-07-10 14:18   ` H.J. Lu
2007-07-10 16:37     ` Alan Modra

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).