[GOLD PATCH]: Elide non-pic tests on sparc64.

David Miller davem@davemloft.net
Thu Apr 17 04:35:00 GMT 2008


I initially believed that I could make non-pic shared libraries work
on sparc64, but it simply isn't possible to do so generally.

Handling WDISP30 relocs could be done by forcing them through the PLT
when linking a shared library.

But even with that, for some code models the data address formation
can't be fixed up to full 64-bit locations.  For example, for the
med-low code model which is the default under
sparc64-unknown-linux-gnu only a 32-bit address formation sequence is
emitted when non-PIC.

So simply add sparc64 to FN_PTRS_IN_SO_WITHOUT_PIC.

Now all enabled gold testcases pass for both 32-bit and 64-bit sparc
at least under Linux :-)

Ok to commit?

gold/

2008-04-16  David S. Miller  <davem@davemloft.net>

	* configure.ac (FN_PTRS_IN_SO_WITHOUT_PIC): Add sparc64.
	* configure: Rebuild.

Index: configure
===================================================================
RCS file: /cvs/src/src/gold/configure,v
retrieving revision 1.30
diff -u -p -r1.30 configure
--- configure	15 Apr 2008 05:16:51 -0000	1.30
+++ configure	17 Apr 2008 04:31:29 -0000
@@ -4527,6 +4527,7 @@ if
   case $target_cpu in
     i?86) true;;
     x86_64) false;;
+    sparc64) false;;
     *) true;;
   esac; then
   FN_PTRS_IN_SO_WITHOUT_PIC_TRUE=
Index: configure.ac
===================================================================
RCS file: /cvs/src/src/gold/configure.ac,v
retrieving revision 1.30
diff -u -p -r1.30 configure.ac
--- configure.ac	15 Apr 2008 05:16:51 -0000	1.30
+++ configure.ac	17 Apr 2008 04:31:29 -0000
@@ -196,6 +196,7 @@ AM_CONDITIONAL(FN_PTRS_IN_SO_WITHOUT_PIC
   case $target_cpu in
     i?86) true;;
     x86_64) false;;
+    sparc64) false;;
     *) true;;
   esac])
 



More information about the Binutils mailing list