aboutsummaryrefslogtreecommitdiff
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:13:16 -0400
commit1bc05ece9a56bcf077bc5bd2007740e9db858faf (patch)
tree3d2eda4cd19b9f77881b10fd33613a10554c0581
parent17ce9372c431e3fecaba9285104f5d4fb32c4ebe (diff)
downloadglibc-1bc05ece9a56bcf077bc5bd2007740e9db858faf.zip
glibc-1bc05ece9a56bcf077bc5bd2007740e9db858faf.tar.gz
glibc-1bc05ece9a56bcf077bc5bd2007740e9db858faf.tar.bz2
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/eabi/setjmp.S: Change PIC to SHARED. * sysdeps/arm/eabi/__longjmp.S: Likewise
-rw-r--r--ports/sysdeps/arm/__longjmp.S4
-rw-r--r--ports/sysdeps/arm/setjmp.S4
2 files changed, 4 insertions, 4 deletions
diff --git a/ports/sysdeps/arm/__longjmp.S b/ports/sysdeps/arm/__longjmp.S
index a5edede..6b29b38 100644
--- a/ports/sysdeps/arm/__longjmp.S
+++ b/ports/sysdeps/arm/__longjmp.S
@@ -61,7 +61,7 @@ ENTRY (__longjmp)
add a2, a2, a3
ldr a2, [a2, #RTLD_GLOBAL_RO_DL_HWCAP_OFFSET]
# else
-# ifdef PIC
+# ifdef SHARED
ldr a2, 1f
ldr a3, .Lrtld_global_ro
0: add a2, pc, a2
@@ -114,7 +114,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/ports/sysdeps/arm/setjmp.S b/ports/sysdeps/arm/setjmp.S
index a6c161d..d2afde3 100644
--- a/ports/sysdeps/arm/setjmp.S
+++ b/ports/sysdeps/arm/setjmp.S
@@ -43,7 +43,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
@@ -99,7 +99,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)