From 8608bf4f2335a2dbf1d0b3b70a2fe9b1cb34db78 Mon Sep 17 00:00:00 2001 From: Nicholas Clifton Date: Apr 07 2010 20:45:15 +0000 Subject: Do not allow unique symbols to be bound locally. (PR ld/11434) --- diff --git a/binutils-2.19.51.0.14-do-not-bind-unique-symbols-locally.patch b/binutils-2.19.51.0.14-do-not-bind-unique-symbols-locally.patch new file mode 100644 index 0000000..8def52b --- /dev/null +++ b/binutils-2.19.51.0.14-do-not-bind-unique-symbols-locally.patch @@ -0,0 +1,52 @@ +diff -rcp ../binutils-2.19.51.0.14.original/bfd/ChangeLog bfd/ChangeLog +*** ../binutils-2.19.51.0.14.original/bfd/ChangeLog 2010-04-07 16:56:11.000000000 +0100 +--- bfd/ChangeLog 2010-04-07 16:59:38.000000000 +0100 +*************** +*** 1,7 **** + 2010-04-07 Nick Clifton + + BZ 568941 +! Import this patch from the mainline. + + 2010-02-18 H.J. Lu + +--- 1,16 ---- + 2010-04-07 Nick Clifton + ++ Import this patch from the mainline: ++ ++ 2010-03-26 H.J. Lu ++ ++ PR ld/11434 ++ * elf-bfd.h (SYMBOLIC_BIND): Don't bind unique symbols locally. ++ ++ 2010-04-07 Nick Clifton ++ + BZ 568941 +! Import this patch from the mainline: + + 2010-02-18 H.J. Lu + +diff -rcp ../binutils-2.19.51.0.14.original/bfd/elf-bfd.h bfd/elf-bfd.h +*** ../binutils-2.19.51.0.14.original/bfd/elf-bfd.h 2010-04-07 16:56:10.000000000 +0100 +--- bfd/elf-bfd.h 2010-04-07 16:57:50.000000000 +0100 +*************** extern asection _bfd_elf_large_com_secti +*** 2290,2297 **** + while (0) + + /* Will a symbol be bound to the the definition within the shared +! library, if any. */ + #define SYMBOLIC_BIND(INFO, H) \ +! ((INFO)->symbolic || ((INFO)->dynamic && !(H)->dynamic)) + + #endif /* _LIBELF_H_ */ +--- 2290,2298 ---- + while (0) + + /* Will a symbol be bound to the the definition within the shared +! library, if any. A unique symbol can never be bound locally. */ + #define SYMBOLIC_BIND(INFO, H) \ +! (! (H)->unique_global \ +! && ((INFO)->symbolic || ((INFO)->dynamic && !(H)->dynamic))) + + #endif /* _LIBELF_H_ */ diff --git a/binutils.spec b/binutils.spec index eac81c1..d85bbca 100644 --- a/binutils.spec +++ b/binutils.spec @@ -17,7 +17,7 @@ Summary: A GNU collection of binary utilities Name: %{?cross}binutils%{?_with_debug:-debug} Version: 2.19.51.0.14 -Release: 39%{?dist} +Release: 40%{?dist} License: GPLv3+ Group: Development/Tools URL: http://sources.redhat.com/binutils @@ -38,6 +38,7 @@ Patch13: binutils-2.19.51.0.14-ifunc-ld-s.patch Patch14: binutils-2.19.51.0.14-ppc-hidden-plt-relocs.patch Patch15: binutils-2.19.51.0.14-only-keep-debug-doc.patch Patch16: binutils-2.19.51.0.14-do-not-copy-ifunc.patch +Patch17: binutils-2.19.51.0.14-do-not-bind-unique-symbols-locally.patch %if 0%{?_with_debug:1} # Define this if you want to skip the strip step and preserve debug info. @@ -116,7 +117,8 @@ to consider using libelf instead of BFD. %patch13 -p0 -b .ifunc-ld-s~ %patch14 -p0 -b .ppc-plt~ %patch15 -p0 -b .keep-debug-doc~ -%patch16 -p0 -b .do-not-kepp-ifunc~ +%patch16 -p0 -b .do-not-keep-ifunc~ +%patch17 -p0 -b .do-not-bind-unique~ # We cannot run autotools as there is an exact requirement of autoconf-2.59. @@ -384,6 +386,9 @@ exit 0 %endif # %{isnative} %changelog +* Wed Apr 7 2010 Nick Clifton 2.19.51.0.14-40 +- Do not allow unique symbols to be bound locally. (PR ld/11434) + * Wed Apr 7 2010 Nick Clifton 2.19.51.0.14-39 - Do not set ELFOSABI_LINUX on binaries which just link to IFUNC using DSOs. (BZ 568941)