From eaa735511a167b987d4f9fd13136d0a9ce790704 Mon Sep 17 00:00:00 2001 From: Nick Clifton Date: Aug 21 2014 09:20:37 +0000 Subject: Import patch from mainline to fix indirect symbol resolution. Resolves: BZ #1123714 --- diff --git a/binutils-2.24-indirect-chain.patch b/binutils-2.24-indirect-chain.patch new file mode 100644 index 0000000..b255424 --- /dev/null +++ b/binutils-2.24-indirect-chain.patch @@ -0,0 +1,28 @@ +*** ../binutils-2.24.orig/bfd/elflink.c 2014-08-21 09:17:27.753408085 +0100 +--- bfd/elflink.c 2014-08-21 10:04:52.174935912 +0100 +*************** _bfd_elf_add_default_symbol (bfd *abfd, +*** 1705,1710 **** +--- 1705,1716 ---- + ht = (struct elf_link_hash_entry *) hi->root.u.i.link; + (*bed->elf_backend_copy_indirect_symbol) (info, ht, hi); + ++ /* A reference to the SHORTNAME symbol from a dynamic library ++ will be satisfied by the versioned symbol at runtime. In ++ effect, we have a reference to the versioned symbol. */ ++ ht->ref_dynamic_nonweak |= hi->ref_dynamic_nonweak; ++ hi->dynamic_def |= ht->dynamic_def; ++ + /* See if the new flags lead us to realize that the symbol must + be dynamic. */ + if (! *dynsym) +*************** nondefault: +*** 1774,1779 **** +--- 1780,1787 ---- + if (hi->root.type == bfd_link_hash_indirect) + { + (*bed->elf_backend_copy_indirect_symbol) (info, h, hi); ++ h->ref_dynamic_nonweak |= hi->ref_dynamic_nonweak; ++ hi->dynamic_def |= h->dynamic_def; + + /* See if the new flags lead us to realize that the symbol + must be dynamic. */ diff --git a/binutils.spec b/binutils.spec index 98855eb..3d07e2e 100644 --- a/binutils.spec +++ b/binutils.spec @@ -19,7 +19,7 @@ Summary: A GNU collection of binary utilities Name: %{?cross}binutils%{?_with_debug:-debug} Version: 2.24 -Release: 20%{?dist} +Release: 21%{?dist} License: GPLv3+ Group: Development/Tools URL: http://sources.redhat.com/binutils @@ -66,6 +66,7 @@ Patch21: binutils-2.24-fat-lto-objects.patch Patch22: binutils-2.24-symbol-warning.patch Patch23: binutils-2.24-aarch64-ld-shared-non-PIC-xfail.patch Patch24: binutils-2.24-weak-sym-merge.patch +Patch25: binutils-2.24-indirect-chain.patch Provides: bundled(libiberty) @@ -194,6 +195,7 @@ using libelf instead of BFD. %patch22 -p1 -b .symwarn~ %patch23 -p1 -b .ld-aarch64-xfails~ %patch24 -p0 -b .weak-sym-merge~ +%patch25 -p0 -b .indirect-chain~ # We cannot run autotools as there is an exact requirement of autoconf-2.59. @@ -507,6 +509,10 @@ exit 0 %endif # %{isnative} %changelog +* Thu Aug 21 2014 Nick Clifton - 2.24-21 +- Import patch from mainline to fix indirect symbol resolution. + Resolves: BZ #1123714 + * Tue Aug 19 2014 Nick Clifton - 2.24-20 - Enable deterministic archives by default. Resolves: BZ #1124342