diff --git a/binutils-2.19.51.0.14-do-not-copy-ifunc.patch b/binutils-2.19.51.0.14-do-not-copy-ifunc.patch new file mode 100644 index 0000000..1e5a658 --- /dev/null +++ b/binutils-2.19.51.0.14-do-not-copy-ifunc.patch @@ -0,0 +1,114 @@ +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 15:20:57.000000000 +0100 +--- bfd/ChangeLog 2010-04-07 15:22:56.000000000 +0100 +*************** +*** 1,3 **** +--- 1,16 ---- ++ 2010-04-07 Nick Clifton ++ ++ BZ 568941 ++ Import this patch from the mainline. ++ ++ 2010-02-18 H.J. Lu ++ ++ * elf32-i386.c (elf_i386_add_symbol_hook): Don't set ++ has_ifunc_symbols if the symbol comes from a shared library. ++ * elf32-ppc.c (ppc_elf_add_symbol_hook): Likewise. ++ * elf64-ppc.c (ppc64_elf_add_symbol_hook): Likewise. ++ * elf64-x86-64.c (elf64_x86_64_add_symbol_hook): Likewise. ++ + 2010-02-08 Nick Clifton + + BZ 562249 +Only in bfd: ChangeLog.orig +Only in bfd: ChangeLog.rej +diff -rcp ../binutils-2.19.51.0.14.original/bfd/elf32-i386.c bfd/elf32-i386.c +*** ../binutils-2.19.51.0.14.original/bfd/elf32-i386.c 2010-04-07 15:20:57.000000000 +0100 +--- bfd/elf32-i386.c 2010-04-07 15:21:44.000000000 +0100 +*************** elf_i386_add_symbol_hook (bfd * abfd ATT +*** 4610,4616 **** + asection ** secp ATTRIBUTE_UNUSED, + bfd_vma * valp ATTRIBUTE_UNUSED) + { +! if (ELF_ST_TYPE (sym->st_info) == STT_GNU_IFUNC) + elf_tdata (info->output_bfd)->has_ifunc_symbols = TRUE; + + return _bfd_elf_add_sharable_symbol (abfd, info, sym, namep, flagsp, +--- 4610,4617 ---- + asection ** secp ATTRIBUTE_UNUSED, + bfd_vma * valp ATTRIBUTE_UNUSED) + { +! if ((abfd->flags & DYNAMIC) == 0 +! && ELF_ST_TYPE (sym->st_info) == STT_GNU_IFUNC) + elf_tdata (info->output_bfd)->has_ifunc_symbols = TRUE; + + return _bfd_elf_add_sharable_symbol (abfd, info, sym, namep, flagsp, +Only in bfd: elf32-i386.c.orig +diff -rcp ../binutils-2.19.51.0.14.original/bfd/elf32-ppc.c bfd/elf32-ppc.c +*** ../binutils-2.19.51.0.14.original/bfd/elf32-ppc.c 2010-04-07 15:20:57.000000000 +0100 +--- bfd/elf32-ppc.c 2010-04-07 15:21:44.000000000 +0100 +*************** ppc_elf_add_symbol_hook (bfd *abfd, +*** 3121,3127 **** + *valp = sym->st_size; + } + +! if (ELF_ST_TYPE (sym->st_info) == STT_GNU_IFUNC) + elf_tdata (info->output_bfd)->has_ifunc_symbols = TRUE; + + return TRUE; +--- 3121,3128 ---- + *valp = sym->st_size; + } + +! if ((abfd->flags & DYNAMIC) == 0 +! && ELF_ST_TYPE (sym->st_info) == STT_GNU_IFUNC) + elf_tdata (info->output_bfd)->has_ifunc_symbols = TRUE; + + return TRUE; +Only in bfd: elf32-ppc.c.orig +diff -rcp ../binutils-2.19.51.0.14.original/bfd/elf64-ppc.c bfd/elf64-ppc.c +*** ../binutils-2.19.51.0.14.original/bfd/elf64-ppc.c 2010-04-07 15:20:57.000000000 +0100 +--- bfd/elf64-ppc.c 2010-04-07 15:21:44.000000000 +0100 +*************** ppc64_elf_add_symbol_hook (bfd *ibfd ATT +*** 4420,4426 **** + bfd_vma *value ATTRIBUTE_UNUSED) + { + if (ELF_ST_TYPE (isym->st_info) == STT_GNU_IFUNC) +! elf_tdata (info->output_bfd)->has_ifunc_symbols = TRUE; + else if (ELF_ST_TYPE (isym->st_info) == STT_FUNC) + ; + else if (*sec != NULL +--- 4420,4429 ---- + bfd_vma *value ATTRIBUTE_UNUSED) + { + if (ELF_ST_TYPE (isym->st_info) == STT_GNU_IFUNC) +! { +! if ((ibfd->flags & DYNAMIC) == 0) +! elf_tdata (info->output_bfd)->has_ifunc_symbols = TRUE; +! } + else if (ELF_ST_TYPE (isym->st_info) == STT_FUNC) + ; + else if (*sec != NULL +Only in bfd: elf64-ppc.c.orig +diff -rcp ../binutils-2.19.51.0.14.original/bfd/elf64-x86-64.c bfd/elf64-x86-64.c +*** ../binutils-2.19.51.0.14.original/bfd/elf64-x86-64.c 2010-04-07 15:20:55.000000000 +0100 +--- bfd/elf64-x86-64.c 2010-04-07 15:21:44.000000000 +0100 +*************** elf64_x86_64_add_symbol_hook (bfd *abfd, +*** 4259,4265 **** + return TRUE; + } + +! if (ELF_ST_TYPE (sym->st_info) == STT_GNU_IFUNC) + elf_tdata (info->output_bfd)->has_ifunc_symbols = TRUE; + + return _bfd_elf_add_sharable_symbol (abfd, info, sym, namep, flagsp, +--- 4259,4266 ---- + return TRUE; + } + +! if ((abfd->flags & DYNAMIC) == 0 +! && ELF_ST_TYPE (sym->st_info) == STT_GNU_IFUNC) + elf_tdata (info->output_bfd)->has_ifunc_symbols = TRUE; + + return _bfd_elf_add_sharable_symbol (abfd, info, sym, namep, flagsp, +Only in bfd: elf64-x86-64.c.orig diff --git a/binutils.spec b/binutils.spec index 2022976..eac81c1 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: 38%{?dist} +Release: 39%{?dist} License: GPLv3+ Group: Development/Tools URL: http://sources.redhat.com/binutils @@ -37,6 +37,7 @@ Patch12: binutils-2.19.51.0.14-cfi-sections.patch 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 %if 0%{?_with_debug:1} # Define this if you want to skip the strip step and preserve debug info. @@ -115,6 +116,7 @@ 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~ # We cannot run autotools as there is an exact requirement of autoconf-2.59. @@ -382,6 +384,9 @@ exit 0 %endif # %{isnative} %changelog +* 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) + * Mon Mar 1 2010 Nick Clifton 2.19.51.0.14-38 - Fixup man page description of objcopy's --only-keep-debug option. BZ 569161.