rpms/spu-binutils/devel binutils-2.18.50.0.9-linkonce-r-discard.patch, NONE, 1.1 spu-binutils.spec, 1.3, 1.4

Jochen Roth jroth at fedoraproject.org
Wed Nov 5 08:49:03 UTC 2008


Author: jroth

Update of /cvs/pkgs/rpms/spu-binutils/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv31421

Modified Files:
	spu-binutils.spec 
Added Files:
	binutils-2.18.50.0.9-linkonce-r-discard.patch 
Log Message:
- adopted to latest binutils changes
- BZ 468996


binutils-2.18.50.0.9-linkonce-r-discard.patch:

--- NEW FILE binutils-2.18.50.0.9-linkonce-r-discard.patch ---
http://sourceware.org/ml/binutils/2008-10/msg00235.html

2008-10-26  Jan Kratochvil  <jan.kratochvil at redhat.com>

	* elflink.c (elf_link_input_bfd): Handle pre-COMDAT g++-3.4 relocations
	in `.gnu.linkonce.r.*' referencing its `.gnu.linkonce.t.*'.

2008-10-26  Jan Kratochvil  <jan.kratochvil at redhat.com>

	* ld-elf/linkoncerdiff.d, ld-elf/linkoncerdiff1.s,
	ld-elf/linkoncerdiff2.s: New.

--- bfd/elflink.c	2008-10-22 21:08:20.000000000 +0200
+++ bfd/elflink.c	2008-10-29 18:18:43.000000000 +0100
@@ -7649,7 +7649,23 @@ elf_link_input_bfd (struct elf_final_lin
 		  if ((sec = *ps) != NULL && elf_discarded_section (sec))
 		    {
 		      BFD_ASSERT (r_symndx != 0);
-		      if (action_discarded & COMPLAIN)
+
+		      /* Do not complain on unresolved relocations in
+			 `.gnu.linkonce.r.F' referencing its discarded
+			 `.gnu.linkonce.t.F' counterpart - g++-3.4 specific as
+			 g++-4.x is using COMDAT groups (without the
+			 `.gnu.linkonce' prefix) instead.  `.gnu.linkonce.r.*'
+			 were the `.rodata' part of its matching
+			 `.gnu.linkonce.t.*'.  If `.gnu.linkonce.r.F' is not
+			 discarded with its `.gnu.linkonce.t.F' being discarded
+			 means we chose one-only `.gnu.linkonce.t.F' section
+			 from an other file not needing any `.gnu.linkonce.r.F'
+			 and thus `.gnu.linkonce.r.F' could be in fact also
+			 discarded.  */
+		      if ((action_discarded & COMPLAIN)
+		          && !(CONST_STRNEQ (o->name, ".gnu.linkonce.r.")
+			       && CONST_STRNEQ (sec->name, ".gnu.linkonce.t.")
+			       && strcmp (o->name + 16, sec->name + 16) == 0))
 			(*finfo->info->callbacks->einfo)
 			  (_("%X`%s' referenced in section `%A' of %B: "
 			     "defined in discarded section `%A' of %B\n"),
--- ld/testsuite/ld-elf/linkoncerdiff.d	2008-10-22 21:16:04.000000000 +0200
+++ ld/testsuite/ld-elf/linkoncerdiff.d	2008-10-29 18:17:07.000000000 +0100
@@ -0,0 +1,5 @@
+#source: linkoncerdiff1.s
+#source: linkoncerdiff2.s
+#notarget: arc* d30v* dlx* openrisc* or32* pj*
+#ld: -r
+#error: `.gnu.linkonce.t.bar' referenced in section `.gnu.linkonce.r.foo' of tmpdir/dump1.o: defined in discarded section `.gnu.linkonce.t.bar' of tmpdir/dump1.o
--- ld/testsuite/ld-elf/linkoncerdiff1.s	2008-10-22 21:16:04.000000000 +0200
+++ ld/testsuite/ld-elf/linkoncerdiff1.s	2008-10-29 18:17:07.000000000 +0100
@@ -0,0 +1,7 @@
+	.section	.gnu.linkonce.t.foo, "a", %progbits
+	.globl	symfoo
+symfoo:
+
+	.section	.gnu.linkonce.t.bar, "a", %progbits
+	.globl	symbar
+symbar:
--- ld/testsuite/ld-elf/linkoncerdiff2.s	2008-10-22 21:16:04.000000000 +0200
+++ ld/testsuite/ld-elf/linkoncerdiff2.s	2008-10-29 18:17:07.000000000 +0100
@@ -0,0 +1,17 @@
+	.section	.gnu.linkonce.t.foo, "a", %progbits
+1:
+	.globl	symfoo
+symfoo:
+	.long	0
+
+	.section	.gnu.linkonce.t.bar, "a", %progbits
+2:
+	.globl	symbar
+symbar:
+	.long	0
+
+	.section	.gnu.linkonce.r.foo, "a", %progbits
+	.long	1b
+	.long	symfoo
+	.long	2b
+	.long	symbar


Index: spu-binutils.spec
===================================================================
RCS file: /cvs/pkgs/rpms/spu-binutils/devel/spu-binutils.spec,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- spu-binutils.spec	29 Oct 2008 14:02:45 -0000	1.3
+++ spu-binutils.spec	5 Nov 2008 08:48:33 -0000	1.4
@@ -18,7 +18,7 @@
 Summary: A GNU collection of binary utilities
 Name: %{?cross}binutils%{?_with_debug:-debug}
 Version: 2.18.50.0.9
-Release: 8%{?dist}
+Release: 9%{?dist}
 License: GPLv3+
 Group: Development/Tools
 URL: http://sources.redhat.com/binutils
@@ -33,6 +33,7 @@
 Patch11: binutils-2.18.50.0.9-largefile.patch
 Patch12: binutils-2.18.50.0.9-set-long-long.patch
 Patch13: binutils-2.18.50.0.9-upstream.patch
+Patch14: binutils-2.18.50.0.9-linkonce-r-discard.patch
 
 %if 0%{?_with_debug:1}
 # Define this if you want to skip the strip step and preserve debug info.
@@ -82,6 +83,7 @@
 Conflicts: binutils < 2.17.50.0.3-4
 Requires(post): /sbin/install-info
 Requires(preun): /sbin/install-info
+Requires: zlib-devel
 
 %description devel
 This package contains BFD and opcodes static libraries and associated
@@ -104,6 +106,7 @@
 %patch11 -p0 -b .largefile~
 %patch12 -p0 -b .set-long-long~
 %patch13 -p0 -b .upstream~
+%patch14 -p0 -b .linkonce-r-discard~
 
 # We cannot run autotools as there is an exact requirement of autoconf-2.59.
 
@@ -219,12 +222,11 @@
 # Remove libtool files, which reference the .so libs
 rm -f %{buildroot}%{_prefix}/%{_lib}/lib{bfd,opcodes}.la
 
+# Sanity check --enable-64-bit-bfd really works.
+grep '^#define BFD_ARCH_SIZE 64$' %{buildroot}%{_prefix}/include/bfd.h
 # Fix multilib conflicts of generated values by __WORDSIZE-based expressions.
 %ifarch %{ix86} x86_64 ppc ppc64 s390 s390x sparc sparc64
 sed -i -e '/^#include "ansidecl.h"/{p;s~^.*$~#include <bits/wordsize.h>~;}' \
-%ifarch %{ix86} x86_64
-    -e 's/^#define BFD_ARCH_SIZE \(32\|64\) *$/#define BFD_ARCH_SIZE __WORDSIZE/' \
-%endif
     -e 's/^#define BFD_DEFAULT_TARGET_SIZE \(32\|64\) *$/#define BFD_DEFAULT_TARGET_SIZE __WORDSIZE/' \
     -e 's/^#define BFD_HOST_64BIT_LONG [01] *$/#define BFD_HOST_64BIT_LONG (__WORDSIZE == 64)/' \
     -e 's/^#define BFD_HOST_64_BIT \(long \)\?long *$/#if __WORDSIZE == 32\
@@ -274,6 +276,9 @@
 #rm -rf %{buildroot}%{_prefix}/share/locale
 #rm -rf %{buildroot}%{_mandir}
 rm -rf %{buildroot}%{_prefix}/%{_lib}/libiberty.a
+%if "%{_lib}" == "lib64"
+rm -rf %{buildroot}%{_prefix}/%{binutils_target}
+%endif
 %endif # !%{isnative}
 
 %find_lang %{?cross}binutils
@@ -335,10 +340,12 @@
 %exclude %{_prefix}/%{_lib}/libopcodes.so
 %endif
 %if !%{isnative}
-%dir %{_prefix}/%{binutils_target}/bin
+%if "%{_lib}" == "lib"
 %dir %{_prefix}/%{binutils_target}/%{_lib}
-%{_prefix}/%{binutils_target}/bin/*
 %{_prefix}/%{binutils_target}/%{_lib}/ldscripts
+%dir %{_prefix}/%{binutils_target}/bin
+%{_prefix}/%{binutils_target}/bin/*
+%endif #lib64
 %else # %{isnative}
 %{_infodir}/[^b]*info*
 %{_infodir}/binutils*info*
@@ -353,7 +360,15 @@
 %endif # !%{isnative}
 
 %changelog
-* Tue Oct 29 2008 Jochen Roth <jroth at linux.vnet.ibm.com> 2.18.50.0.9-8
+* Tue Nov  4 2008 Jochen Roth <jroth at linux.vnet.ibm.com> 2.18.50.0.9-9
+- adopted to changes in binutils spec file:
+- binutils-devel now requires zlib-devel (BZ 463101 comment 5).
+- Fix complains on .gnu.linkonce.r relocations to their discarded
+  .gnu.linkonce.t counterparts
+- Fix %%{_prefix}/include/bfd.h on 32-bit hosts due to the 64-bit BFD target
+  support from 2.18.50.0.8-2 (BZ 468495)
+
+* Tue Oct 28 2008 Jochen Roth <jroth at linux.vnet.ibm.com> 2.18.50.0.9-8
 - ppc64 and ppc version of spu-binutils caused a file conflict (BZ 468996)
 - fixed some rpmlint complaints
 




More information about the fedora-extras-commits mailing list