summaryrefslogtreecommitdiff
path: root/libc
diff options
context:
space:
mode:
authorDavid Schleef <ds@schleef.org>2002-04-10 07:20:20 +0000
committerDavid Schleef <ds@schleef.org>2002-04-10 07:20:20 +0000
commitf0923988dea536a51618d3cdca0c2621699143f4 (patch)
treea94477742415f4434d13774ff79a5345e2c75749 /libc
parent17c0e72289c2f3703405eba3392861077dae8030 (diff)
Make assembly code PIC-compatible.
Diffstat (limited to 'libc')
-rw-r--r--libc/sysdeps/linux/powerpc/brk.S4
-rw-r--r--libc/sysdeps/linux/powerpc/bsd-_setjmp.S4
-rw-r--r--libc/sysdeps/linux/powerpc/bsd-setjmp.S4
-rw-r--r--libc/sysdeps/linux/powerpc/clone.S12
-rw-r--r--libc/sysdeps/linux/powerpc/setjmp.S4
5 files changed, 28 insertions, 0 deletions
diff --git a/libc/sysdeps/linux/powerpc/brk.S b/libc/sysdeps/linux/powerpc/brk.S
index 57a8fb838..3a9b9fd37 100644
--- a/libc/sysdeps/linux/powerpc/brk.S
+++ b/libc/sysdeps/linux/powerpc/brk.S
@@ -51,7 +51,11 @@ __brk:
li r3,0
blelr+
li r3,ENOMEM
+#ifdef __PIC__
+ b __syscall_error@plt
+#else
b __syscall_error
+#endif
.size __brk,.-__brk
.weak brk;
diff --git a/libc/sysdeps/linux/powerpc/bsd-_setjmp.S b/libc/sysdeps/linux/powerpc/bsd-_setjmp.S
index ef898a7e1..d58e45b13 100644
--- a/libc/sysdeps/linux/powerpc/bsd-_setjmp.S
+++ b/libc/sysdeps/linux/powerpc/bsd-_setjmp.S
@@ -29,5 +29,9 @@
_setjmp:
li r4,0 /* Set second argument to 0. */
+#ifdef __PIC__
+ b __sigsetjmp@plt
+#else
b __sigsetjmp
+#endif
.size _setjmp,.-_setjmp
diff --git a/libc/sysdeps/linux/powerpc/bsd-setjmp.S b/libc/sysdeps/linux/powerpc/bsd-setjmp.S
index 1555bb2b3..6128d9fa2 100644
--- a/libc/sysdeps/linux/powerpc/bsd-setjmp.S
+++ b/libc/sysdeps/linux/powerpc/bsd-setjmp.S
@@ -29,7 +29,11 @@
__setjmp:
li r4,1 /* Set second argument to 1. */
+#ifdef __PIC__
+ b __sigsetjmp@plt
+#else
b __sigsetjmp
+#endif
.size __setjmp,.-__setjmp
.globl setjmp;
diff --git a/libc/sysdeps/linux/powerpc/clone.S b/libc/sysdeps/linux/powerpc/clone.S
index c8f0ebfc5..edce8d569 100644
--- a/libc/sysdeps/linux/powerpc/clone.S
+++ b/libc/sysdeps/linux/powerpc/clone.S
@@ -79,18 +79,30 @@ __clone:
mr r3,r31
bctrl
/* Call _exit with result from procedure. */
+#ifdef __PIC__
+ b _exit@plt
+#else
b _exit
+#endif
.Lparent:
/* Parent. Restore registers & return. */
lmw r29,16(r1)
addi r1,r1,32
bnslr+
+#ifdef __PIC__
+ b __syscall_error@plt
+#else
b __syscall_error
+#endif
.Lbadargs:
li r3,EINVAL
+#ifdef __PIC__
+ b __syscall_error@plt
+#else
b __syscall_error
+#endif
.size __clone,.-__clone
.weak clone;
diff --git a/libc/sysdeps/linux/powerpc/setjmp.S b/libc/sysdeps/linux/powerpc/setjmp.S
index 6cf48544b..84c287f95 100644
--- a/libc/sysdeps/linux/powerpc/setjmp.S
+++ b/libc/sysdeps/linux/powerpc/setjmp.S
@@ -76,5 +76,9 @@ FP( stfd fp29,((JB_FPRS+15*2)*4)(3))
FP( stfd fp30,((JB_FPRS+16*2)*4)(3))
stw r31,((JB_GPRS+17)*4)(3)
FP( stfd fp31,((JB_FPRS+17*2)*4)(3))
+#ifdef __PIC__
+ b __sigjmp_save@plt
+#else
b __sigjmp_save
+#endif
.size __sigsetjmp,.-__sigsetjmp