rpms/binutils/F-12 binutils-2.19.51.0.14-do-not-copy-ifunc.patch, NONE, 1.1 binutils.spec, 1.180, 1.181

Nicholas Clifton nickc at fedoraproject.org
Wed Apr 7 15:33:13 UTC 2010


Author: nickc

Update of /cvs/pkgs/rpms/binutils/F-12
In directory cvs01.phx2.fedoraproject.org:/tmp/cvs-serv2875

Modified Files:
	binutils.spec 
Added Files:
	binutils-2.19.51.0.14-do-not-copy-ifunc.patch 
Log Message:
Do not set ELFOSABI_LINUX on binaries which just link to IFUNC using DSOs.  (BZ 568941)


binutils-2.19.51.0.14-do-not-copy-ifunc.patch:
 ChangeLog           |   13 +++++++++++++
 ChangeLog.orig      |only
 ChangeLog.rej       |only
 elf32-i386.c        |    3 !!!
 elf32-i386.c.orig   |only
 elf32-ppc.c         |    3 !!!
 elf32-ppc.c.orig    |only
 elf64-ppc.c         |    5 !!!!!
 elf64-ppc.c.orig    |only
 elf64-x86-64.c      |    3 !!!
 elf64-x86-64.c.orig |only
 11 files changed, 13 insertions(+), 14 modifications(!)

--- NEW FILE binutils-2.19.51.0.14-do-not-copy-ifunc.patch ---
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  <nickc at redhat.com>
+ 
+ 	BZ 568941
+ 	Import this patch from the mainline.
+ 
+ 	2010-02-18  H.J. Lu  <hongjiu.lu at intel.com>
+ 
+ 	* 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  <nickc at redhat.com>
  
  	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


Index: binutils.spec
===================================================================
RCS file: /cvs/pkgs/rpms/binutils/F-12/binutils.spec,v
retrieving revision 1.180
retrieving revision 1.181
diff -u -p -r1.180 -r1.181
--- binutils.spec	1 Mar 2010 16:36:10 -0000	1.180
+++ binutils.spec	7 Apr 2010 15:33:13 -0000	1.181
@@ -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-secti
 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 <nickc at redhat.com> 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 <nickc at redhat.com> 2.19.51.0.14-38
 - Fixup man page description of objcopy's --only-keep-debug option.  BZ 569161.
 



More information about the scm-commits mailing list