PR binutils/4756
* simple.c (bfd_simple_get_relocated_section_content): Don't
apply relocation on executable and shared library.
+2007-07-10 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.
+
2007-07-10 Nathan Sidwell <nathan@codesourcery.com>
* elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Don't eliminate
int storage_needed;
void *saved_offsets;
- if (! (sec->flags & SEC_RELOC))
+ /* Don't apply relocation on executable and shared library. See
+ PR 4756. */
+ 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;