Import the fix for PR ld/17827 from FSF mainline.

Resolves: BZ #1182511
This commit is contained in:
Nick Clifton 2015-01-20 17:14:36 +00:00
parent 5713793b39
commit 09dade7667
2 changed files with 50 additions and 1 deletions

View File

@ -0,0 +1,41 @@
*** 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)

View File

@ -19,7 +19,7 @@
Summary: A GNU collection of binary utilities Summary: A GNU collection of binary utilities
Name: %{?cross}binutils%{?_with_debug:-debug} Name: %{?cross}binutils%{?_with_debug:-debug}
Version: 2.25 Version: 2.25
Release: 3%{?dist} Release: 4%{?dist}
License: GPLv3+ License: GPLv3+
Group: Development/Tools Group: Development/Tools
URL: http://sources.redhat.com/binutils URL: http://sources.redhat.com/binutils
@ -52,6 +52,9 @@ Patch12: binutils-2.25-kernel-ld-r.patch
Patch13: binutils-2.23.2-aarch64-em.patch Patch13: binutils-2.23.2-aarch64-em.patch
# Fix detections little endian PPC shared libraries # Fix detections little endian PPC shared libraries
Patch14: binutils-2.24-ldforcele.patch Patch14: binutils-2.24-ldforcele.patch
# Fix allocation of space for x86_64 PIE relocs.
Patch15: binutils-2.25-x86_64-pie-relocs.patch
Provides: bundled(libiberty) Provides: bundled(libiberty)
@ -172,6 +175,7 @@ using libelf instead of BFD.
%ifarch ppc64le %ifarch ppc64le
%patch14 -p1 -b .ldforcele~ %patch14 -p1 -b .ldforcele~
%endif %endif
%patch15 -p1 -b .x86_64-pie~
# We cannot run autotools as there is an exact requirement of autoconf-2.59. # We cannot run autotools as there is an exact requirement of autoconf-2.59.
@ -482,6 +486,10 @@ exit 0
%endif # %{isnative} %endif # %{isnative}
%changelog %changelog
* Tue Jan 20 2015 Nick Clifton <nickc@redhat.com> - 2.25-4
- Import the fix for PR ld/17827 from FSF mainline.
- Resolves: BZ #1182511
* Mon Jan 12 2015 Nick Clifton <nickc@redhat.com> - 2.25-3 * Mon Jan 12 2015 Nick Clifton <nickc@redhat.com> - 2.25-3
- Suppress building of GOLD for PPC, for now... - Suppress building of GOLD for PPC, for now...
- Resolves: BZ #1173780 - Resolves: BZ #1173780