summaryrefslogtreecommitdiffstats
path: root/libc/arch-x86
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2014-08-07 18:25:35 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2014-08-07 14:59:23 +0000
commitd994622ebf2c4b7e918d9e1f1840f9df88ee7222 (patch)
treeaa3aceda5dd6a59ac00a3372c8acc1866e563922 /libc/arch-x86
parent85ebcfceb62f011e0db359affefcf5570f518bd5 (diff)
parent6b6364a7fc7c3ba37ee907776a29bdc8c9793db9 (diff)
downloadbionic-d994622ebf2c4b7e918d9e1f1840f9df88ee7222.tar.gz
bionic-d994622ebf2c4b7e918d9e1f1840f9df88ee7222.tar.bz2
bionic-d994622ebf2c4b7e918d9e1f1840f9df88ee7222.zip
Merge "Android is all-PIC/PIE."
Diffstat (limited to 'libc/arch-x86')
-rw-r--r--libc/arch-x86/bionic/__stack_chk_fail_local.h7
-rw-r--r--libc/arch-x86/bionic/setjmp.S8
-rw-r--r--libc/arch-x86/bionic/sigsetjmp.S8
-rw-r--r--libc/arch-x86/include/machine/asm.h8
4 files changed, 2 insertions, 29 deletions
diff --git a/libc/arch-x86/bionic/__stack_chk_fail_local.h b/libc/arch-x86/bionic/__stack_chk_fail_local.h
index 4f3699a35..0b0fd7f8b 100644
--- a/libc/arch-x86/bionic/__stack_chk_fail_local.h
+++ b/libc/arch-x86/bionic/__stack_chk_fail_local.h
@@ -26,6 +26,7 @@
* SUCH DAMAGE.
*/
+#include <sys/cdefs.h>
/*
__stack_chk_fail routine is runtime part of stack protector compiler
@@ -48,13 +49,9 @@
*/
#ifdef __i386__
-#ifdef __PIC__
extern void __stack_chk_fail();
-__attribute__ ((visibility ("hidden")))
-void __stack_chk_fail_local()
-{
+__LIBC_HIDDEN__ void __stack_chk_fail_local() {
__stack_chk_fail();
}
#endif
-#endif
diff --git a/libc/arch-x86/bionic/setjmp.S b/libc/arch-x86/bionic/setjmp.S
index 5b943118c..8f9d67c23 100644
--- a/libc/arch-x86/bionic/setjmp.S
+++ b/libc/arch-x86/bionic/setjmp.S
@@ -46,11 +46,7 @@
ENTRY(setjmp)
PIC_PROLOGUE
pushl $0
-#ifdef PIC
call PIC_PLT(sigblock)
-#else
- call sigblock
-#endif
addl $4,%esp
PIC_EPILOGUE
@@ -71,11 +67,7 @@ ENTRY(longjmp)
movl 4(%esp),%edx
PIC_PROLOGUE
pushl 24(%edx)
-#ifdef PIC
call PIC_PLT(sigsetmask)
-#else
- call sigsetmask
-#endif
addl $4,%esp
PIC_EPILOGUE
diff --git a/libc/arch-x86/bionic/sigsetjmp.S b/libc/arch-x86/bionic/sigsetjmp.S
index 7ef732ef2..250c606d7 100644
--- a/libc/arch-x86/bionic/sigsetjmp.S
+++ b/libc/arch-x86/bionic/sigsetjmp.S
@@ -42,11 +42,7 @@ ENTRY(sigsetjmp)
PIC_PROLOGUE
pushl $0
-#ifdef PIC
call PIC_PLT(sigblock)
-#else
- call sigblock
-#endif
addl $4,%esp
PIC_EPILOGUE
@@ -70,11 +66,7 @@ ENTRY(siglongjmp)
PIC_PROLOGUE
pushl 24(%edx)
-#ifdef PIC
call PIC_PLT(sigsetmask)
-#else
- call sigsetmask
-#endif
addl $4,%esp
PIC_EPILOGUE
diff --git a/libc/arch-x86/include/machine/asm.h b/libc/arch-x86/include/machine/asm.h
index 913e6c840..bf77525ee 100644
--- a/libc/arch-x86/include/machine/asm.h
+++ b/libc/arch-x86/include/machine/asm.h
@@ -37,7 +37,6 @@
#ifndef _I386_ASM_H_
#define _I386_ASM_H_
-#ifdef PIC
#define PIC_PROLOGUE \
pushl %ebx; \
call 1f; \
@@ -49,13 +48,6 @@
#define PIC_PLT(x) x@PLT
#define PIC_GOT(x) x@GOT(%ebx)
#define PIC_GOTOFF(x) x@GOTOFF(%ebx)
-#else
-#define PIC_PROLOGUE
-#define PIC_EPILOGUE
-#define PIC_PLT(x) x
-#define PIC_GOT(x) x
-#define PIC_GOTOFF(x) x
-#endif
/* let kernels and others override entrypoint alignment */
#if !defined(_ALIGN_TEXT) && !defined(_KERNEL)