summaryrefslogtreecommitdiff
path: root/sysdeps/unix/sysv/linux/i386/sysdep.h
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/unix/sysv/linux/i386/sysdep.h')
-rw-r--r--sysdeps/unix/sysv/linux/i386/sysdep.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/sysdeps/unix/sysv/linux/i386/sysdep.h b/sysdeps/unix/sysv/linux/i386/sysdep.h
index d64d0a3a5c..a9637be33d 100644
--- a/sysdeps/unix/sysv/linux/i386/sysdep.h
+++ b/sysdeps/unix/sysv/linux/i386/sysdep.h
@@ -118,6 +118,7 @@
.previous
# else
# define SETUP_PIC_REG(reg) \
+ .ifndef __i686.get_pc_thunk.reg; \
.section .gnu.linkonce.t.__i686.get_pc_thunk.reg,"ax",@progbits; \
.globl __i686.get_pc_thunk.reg; \
.hidden __i686.get_pc_thunk.reg; \
@@ -127,9 +128,13 @@ __i686.get_pc_thunk.reg: \
ret; \
.size __i686.get_pc_thunk.reg, . - __i686.get_pc_thunk.reg; \
.previous; \
+ .endif; \
call __i686.get_pc_thunk.reg
# endif
+# define LOAD_PIC_REG(reg) \
+ SETUP_PIC_REG(reg); addl $_GLOBAL_OFFSET_TABLE_, %e##reg
+
# if RTLD_PRIVATE_ERRNO
# define SYSCALL_ERROR_HANDLER \
0:SETUP_PIC_REG(cx); \