summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/i386
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2003-05-30 04:47:47 +0000
committerEric Andersen <andersen@codepoet.org>2003-05-30 04:47:47 +0000
commiteeb9d29da882153b1fa2b1e00178899bb95659b2 (patch)
treef3821d10909b9dab15f70169b1488002e6be770a /libc/sysdeps/linux/i386
parent4352cfec686d850f4bd5a27d9afb99867db01a54 (diff)
In a number of places we erroneously used tests such as '#ifdef PIC' when we
should instead have been testing for '#ifdef __PIC__'. This resulted in NON-PIC code getting mixed into the shared library. Oops!!! -Erik
Diffstat (limited to 'libc/sysdeps/linux/i386')
-rw-r--r--libc/sysdeps/linux/i386/bsd-setjmp.S2
-rw-r--r--libc/sysdeps/linux/i386/clone.S8
-rw-r--r--libc/sysdeps/linux/i386/setjmp.S2
-rw-r--r--libc/sysdeps/linux/i386/syscall.S4
-rw-r--r--libc/sysdeps/linux/i386/vfork.S8
5 files changed, 12 insertions, 12 deletions
diff --git a/libc/sysdeps/linux/i386/bsd-setjmp.S b/libc/sysdeps/linux/i386/bsd-setjmp.S
index 93ae2ea8d..c075bada0 100644
--- a/libc/sysdeps/linux/i386/bsd-setjmp.S
+++ b/libc/sysdeps/linux/i386/bsd-setjmp.S
@@ -42,7 +42,7 @@ setjmp:
/* Call __sigjmp_save. */
pushl $1
pushl 8(%esp)
-#ifdef PIC
+#ifdef __PIC__
/* We cannot use the PLT, because it requires that %ebx be set, but
we can't save and restore our caller's value. Instead, we do an
indirect jump through the GOT, using for the temporary register
diff --git a/libc/sysdeps/linux/i386/clone.S b/libc/sysdeps/linux/i386/clone.S
index c52bb7fd8..93183d208 100644
--- a/libc/sysdeps/linux/i386/clone.S
+++ b/libc/sysdeps/linux/i386/clone.S
@@ -65,11 +65,11 @@ __clone:
CLONE_ERROR_LABEL:
negl %eax
pushl %eax
-#ifdef PIC
- call L(here)
-L(here):
+#ifdef __PIC__
+ call .Lhere
+.Lhere:
popl %ebx
- addl $_GLOBAL_OFFSET_TABLE_+[.-L(here)], %ebx
+ addl $_GLOBAL_OFFSET_TABLE_+[.- .Lhere ], %ebx
call __errno_location@PLT
#else
call __errno_location
diff --git a/libc/sysdeps/linux/i386/setjmp.S b/libc/sysdeps/linux/i386/setjmp.S
index debef7017..ef9deebd6 100644
--- a/libc/sysdeps/linux/i386/setjmp.S
+++ b/libc/sysdeps/linux/i386/setjmp.S
@@ -42,7 +42,7 @@ __sigsetjmp:
movl %ebp, (3 *4)(%eax)
/* Make a tail call to __sigjmp_save; it takes the same args. */
-#ifdef PIC
+#ifdef __PIC__
/* We cannot use the PLT, because it requires that %ebx be set, but
we can't save and restore our caller's value. Instead, we do an
indirect jump through the GOT, using for the temporary register
diff --git a/libc/sysdeps/linux/i386/syscall.S b/libc/sysdeps/linux/i386/syscall.S
index a70a99701..69cafd4fe 100644
--- a/libc/sysdeps/linux/i386/syscall.S
+++ b/libc/sysdeps/linux/i386/syscall.S
@@ -40,7 +40,7 @@ syscall:
cmpl $-4095,%eax
jbe .Ldone
-#ifdef PIC
+#ifdef __PIC__
call Lhere
Lhere:
popl %ebx
@@ -63,7 +63,7 @@ Lhere:
movl %eax,errno
#endif /* __UCLIBC_HAS_THREADS__ */
-#endif /* PIC */
+#endif /* __PIC__ */
movl $-1,%eax
.p2align 4,,7
diff --git a/libc/sysdeps/linux/i386/vfork.S b/libc/sysdeps/linux/i386/vfork.S
index 176f25cc3..e2d87053b 100644
--- a/libc/sysdeps/linux/i386/vfork.S
+++ b/libc/sysdeps/linux/i386/vfork.S
@@ -12,13 +12,13 @@
vfork:
popl %ecx
movl $190,%eax
-#ifdef PIC
+#ifdef __PIC__
pushl %ebx
#endif
#APP
int $0x80
#NO_APP
-#ifdef PIC
+#ifdef __PIC__
popl %ebx
#endif
cmpl $-4095,%eax
@@ -28,7 +28,7 @@ vfork:
.Lerror:
pushl %ecx
-#ifdef PIC
+#ifdef __PIC__
pushl %ebx
call .Lhere
.Lhere:
@@ -53,7 +53,7 @@ vfork:
movl %eax,errno
#endif /* __UCLIBC_HAS_THREADS__ */
-#endif /* PIC */
+#endif /* __PIC__ */
movl $-1,%eax
ret