about summary refs log tree commit diff
diff options
context:
space:
mode:
authorDavid Lamparter <equinox-gentoo@diac24.net>2013-08-16 15:06:34 -0400
committerMike Frysinger <vapier@gentoo.org>2013-08-16 15:06:34 -0400
commit5f825bd3c37b691b58d2b34ba4a8780f86adca41 (patch)
treefd08afe2489248116c133544f5c3f50eec1f3aa3
parentce60218546697b3dd940f4014917d23e0a52e70e (diff)
downloadglibc-5f825bd3c37b691b58d2b34ba4a8780f86adca41.tar.gz
glibc-5f825bd3c37b691b58d2b34ba4a8780f86adca41.tar.xz
glibc-5f825bd3c37b691b58d2b34ba4a8780f86adca41.zip
arm: fix PIC vs SHARED typos
the logic in setjmp/__longjmp incorrectly tie to "PIC" to figure out
whether the code is going into a shared library when it should be using
"SHARED".  otherwise, building static PIC code goes wrong.

https://bugs.gentoo.org/336914
http://sourceware.org/ml/libc-ports/2011-09/msg00018.html

2011-09-19  David Lamparter  <equinox-gentoo@diac24.net>

	* sysdeps/arm/setjmp.S: Change PIC to SHARED.
	* sysdeps/arm/__longjmp.S: Likewise
-rw-r--r--sysdeps/arm/__longjmp.S4
-rw-r--r--sysdeps/arm/setjmp.S4
2 files changed, 4 insertions, 4 deletions
diff --git a/sysdeps/arm/__longjmp.S b/sysdeps/arm/__longjmp.S
index 27d1b713de..351fc6201e 100644
--- a/sysdeps/arm/__longjmp.S
+++ b/sysdeps/arm/__longjmp.S
@@ -83,7 +83,7 @@ ENTRY (__longjmp)
 	add	a4, a4, a3
 	ldr	a4, [a4, #RTLD_GLOBAL_RO_DL_HWCAP_OFFSET]
 # else
-#  ifdef PIC
+#  ifdef SHARED
 	ldr	a4, 1f
 	ldr	a3, .Lrtld_global_ro
 0:	add	a4, pc, a4
@@ -144,7 +144,7 @@ ENTRY (__longjmp)
 .Lrtld_local_ro:
 	.long	C_SYMBOL_NAME(_rtld_local_ro)(GOTOFF)
 # else
-#  ifdef PIC
+#  ifdef SHARED
 1:	.long	_GLOBAL_OFFSET_TABLE_ - 0b - PC_OFS
 .Lrtld_global_ro:
 	.long	C_SYMBOL_NAME(_rtld_global_ro)(GOT)
diff --git a/sysdeps/arm/setjmp.S b/sysdeps/arm/setjmp.S
index 17a16c9b5d..cf4ff861fa 100644
--- a/sysdeps/arm/setjmp.S
+++ b/sysdeps/arm/setjmp.S
@@ -64,7 +64,7 @@ ENTRY (__sigsetjmp)
 	add	a3, a3, a4
 	ldr	a3, [a3, #RTLD_GLOBAL_RO_DL_HWCAP_OFFSET]
 # else
-#  ifdef PIC
+#  ifdef SHARED
 	ldr	a3, 1f
 	ldr	a4, .Lrtld_global_ro
 0:	add	a3, pc, a3
@@ -120,7 +120,7 @@ ENTRY (__sigsetjmp)
 .Lrtld_local_ro:
 	.long	C_SYMBOL_NAME(_rtld_local_ro)(GOTOFF)
 # else
-#  ifdef PIC
+#  ifdef SHARED
 1:	.long	_GLOBAL_OFFSET_TABLE_ - 0b - PC_OFS
 .Lrtld_global_ro:
 	.long	C_SYMBOL_NAME(_rtld_global_ro)(GOT)