binutils/binutils-2.25-x86_64-pie-relocs.patch

42 lines
1.2 KiB
Diff
Raw Normal View History

*** binutils-2.25.orig/bfd/elf64-x86-64.c 2015-01-20 16:57:03.416958519 +0000
--- binutils-2.25/bfd/elf64-x86-64.c 2015-01-20 16:59:10.455588496 +0000
*************** elf_x86_64_allocate_dynrelocs (struct el
*** 2677,2689 ****
&& ! bfd_elf_link_record_dynamic_symbol (info, h))
return FALSE;
}
! /* For PIE, discard space for relocs against symbols which
! turn out to need copy relocs. */
else if (info->executable
&& (h->needs_copy || eh->needs_copy)
&& h->def_dynamic
&& !h->def_regular)
! eh->dyn_relocs = NULL;
}
}
else if (ELIMINATE_COPY_RELOCS)
--- 2677,2699 ----
&& ! bfd_elf_link_record_dynamic_symbol (info, h))
return FALSE;
}
! /* For PIE, discard space for pc-relative relocs against
! symbols which turn out to need copy relocs. */
else if (info->executable
&& (h->needs_copy || eh->needs_copy)
&& h->def_dynamic
&& !h->def_regular)
! {
! struct elf_dyn_relocs **pp;
!
! for (pp = &eh->dyn_relocs; (p = *pp) != NULL; )
! {
! if (p->pc_count != 0)
! *pp = p->next;
! else
! pp = &p->next;
! }
! }
}
}
else if (ELIMINATE_COPY_RELOCS)