Import patch to have common symbols in an executable override definitions in shared objects (PR 19579)

Resolves: #1312507
This commit is contained in:
Nick Clifton 2016-03-14 17:36:56 +00:00
parent c7d41bf2ae
commit 712d1262f6
2 changed files with 29 additions and 1 deletions

View File

@ -0,0 +1,21 @@
--- binutils-2.26.orig/bfd/elflink.c 2016-03-14 17:11:13.628349614 +0000
+++ binutils-2.26/bfd/elflink.c 2016-03-14 17:20:56.512569366 +0000
@@ -1485,13 +1485,16 @@ _bfd_elf_merge_symbol (bfd *abfd,
represent variables; this can cause confusion in principle, but
any such confusion would seem to indicate an erroneous program or
shared library. We also permit a common symbol in a regular
- object to override a weak symbol in a shared object. */
+ object to override a weak symbol in a shared object. A common
+ symbol in executable also overrides a symbol in a shared object. */
if (newdyn
&& newdef
&& (olddef
|| (h->root.type == bfd_link_hash_common
- && (newweak || newfunc))))
+ && (newweak
+ || newfunc
+ || (!olddyn && bfd_link_executable (info))))))
{
*override = TRUE;
newdef = FALSE;

View File

@ -20,7 +20,7 @@
Summary: A GNU collection of binary utilities
Name: %{?cross}binutils%{?_with_debug:-debug}
Version: 2.26
Release: 14%{?dist}
Release: 15%{?dist}
License: GPLv3+
Group: Development/Tools
URL: http://sources.redhat.com/binutils
@ -66,6 +66,8 @@ Patch20: binutils-2.26-lto.patch
Patch21: binutils-rh1312151.patch
# Import fix for PR 19601
Patch22: binutils-2.26-fix-GOT-offset-calculation.patch
# Import fix for PR 19579
Patch23: binutils-2.26-common-definitions.patch
Provides: bundled(libiberty)
@ -196,6 +198,7 @@ using libelf instead of BFD.
%patch20 -p1
%patch21 -p1
%patch22 -p1
%patch23 -p1
# We cannot run autotools as there is an exact requirement of autoconf-2.59.
@ -515,6 +518,10 @@ exit 0
%endif # %{isnative}
%changelog
* Mon Mar 14 2016 Nick Clifton <nickc@redhat.com> 2.26-15
- Import patch to have common symbols in an executable override definitions in shared objects (PR 19579)
(#1312507)
* Mon Feb 29 2016 Nick Clifton <nickc@redhat.com> 2.26-14
- Import patch to fix x86 GOT offset calculation in 2.26 sources (PR 19601)
(#1312489)