[git commit] sh: Change __HAVE_SHARED__ to __PIC__

Carmelo Amoroso carmelo.amoroso at st.com
Thu Jul 9 06:53:02 UTC 2009


commit: http://git.uclibc.org/uClibc/commit/?id=9dd284eb5d042d5cb4fdfca892f5374bdeab4d11
branch: http://git.uclibc.org/uClibc/commit/?id=refs/heads/master


Generate PIC relocations when __PIC__ is defined rather than
__HAVE_SHARED__ (like other architectures).

Signed-off-by: Peter Griffin <pgriffin at mpc-data.co.uk>
Signed-off-by: Carmelo Amoroso <carmelo.amoroso at st.com>
---
 libc/sysdeps/linux/sh/clone.S         |    4 ++--
 libc/sysdeps/linux/sh/setjmp.S        |    2 +-
 libc/sysdeps/linux/sh/syscall_error.S |    4 ++--
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/libc/sysdeps/linux/sh/clone.S b/libc/sysdeps/linux/sh/clone.S
index b912db0..3d18b6d 100644
--- a/libc/sysdeps/linux/sh/clone.S
+++ b/libc/sysdeps/linux/sh/clone.S
@@ -26,7 +26,7 @@
 #include <bits/sysnum.h>
 
 
-#ifdef __HAVE_SHARED__ 
+#ifdef __PIC__
 #define PLTJMP(_x)	_x at PLT
 #else
 #define PLTJMP(_x)	_x
@@ -99,7 +99,7 @@ clone:
 
 	/* we are done, passing the return value through r0  */
 	mov.l	.L1, r1
-#ifdef __HAVE_SHARED__ 
+#ifdef __PIC__
 	mov.l	r12, @-r15
 	sts.l	pr, @-r15
 	mov	r0, r4
diff --git a/libc/sysdeps/linux/sh/setjmp.S b/libc/sysdeps/linux/sh/setjmp.S
index 3296c2b..00475a0 100644
--- a/libc/sysdeps/linux/sh/setjmp.S
+++ b/libc/sysdeps/linux/sh/setjmp.S
@@ -77,7 +77,7 @@ __sigsetjmp_intern:
 	mov.l	r9, @-r4
 	mov.l	r8, @-r4
 
-#ifdef __HAVE_SHARED__ 
+#ifdef __PIC__
 	mov.l	.LG, r2
 	mova	.LG, r0
 	add	r0, r2
diff --git a/libc/sysdeps/linux/sh/syscall_error.S b/libc/sysdeps/linux/sh/syscall_error.S
index 1764ebf..f55dd53 100644
--- a/libc/sysdeps/linux/sh/syscall_error.S
+++ b/libc/sysdeps/linux/sh/syscall_error.S
@@ -3,7 +3,7 @@ __syscall_error:
 	/* Call errno_location, store '-r4' in errno and return -1 */
 	mov.l	r12, @-r15
 	sts.l	pr, @-r15
-#ifdef __HAVE_SHARED__ 
+#ifdef __PIC__
 	mova	.LG, r0
 	mov.l	.LG, r12
 	add	r0, r12
@@ -27,7 +27,7 @@ __syscall_error:
 
 	.align	4
 
-#ifdef __HAVE_SHARED__ 
+#ifdef __PIC__
 1:	.long   __errno_location at GOT
 .LG:	.long	_GLOBAL_OFFSET_TABLE_
 #else
-- 
1.6.3.3


More information about the uClibc-cvs mailing list