From 22682100d705d569fc13018a4a872581cc99b1f5 Mon Sep 17 00:00:00 2001 From: Nick Clifton Date: Mar 14 2016 17:36:17 +0000 Subject: Import patch to have common symbols in an executable override definitions in shared objects (PR 19579) Resolves: #1312507 --- diff --git a/binutils-2.26-common-definitions.patch b/binutils-2.26-common-definitions.patch new file mode 100644 index 0000000..a26e184 --- /dev/null +++ b/binutils-2.26-common-definitions.patch @@ -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; diff --git a/binutils.spec b/binutils.spec index 421cf03..772e9a5 100644 --- a/binutils.spec +++ b/binutils.spec @@ -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 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 2.26-14 - Import patch to fix x86 GOT offset calculation in 2.26 sources (PR 19601) (#1312489)