about summary refs log tree commit diff
path: root/sysdeps/i386/sysdep.h
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2012-02-03 23:22:53 +0000
committerJoseph Myers <joseph@codesourcery.com>2012-02-03 23:22:53 +0000
commit9a1d92541ff2e864aab682d66fba7ea2555ef13b (patch)
treea5b3b673f66207a42c5f53618a328d934b08d8fc /sysdeps/i386/sysdep.h
parent65dc3b75044cc4847e8c523c22daec12fa51702f (diff)
downloadglibc-9a1d92541ff2e864aab682d66fba7ea2555ef13b.tar.gz
glibc-9a1d92541ff2e864aab682d66fba7ea2555ef13b.tar.xz
glibc-9a1d92541ff2e864aab682d66fba7ea2555ef13b.zip
Consistently use macros for x86 PIC thunks.
Diffstat (limited to 'sysdeps/i386/sysdep.h')
-rw-r--r--sysdeps/i386/sysdep.h23
1 files changed, 12 insertions, 11 deletions
diff --git a/sysdeps/i386/sysdep.h b/sysdeps/i386/sysdep.h
index ffa38edd42..577cf8d28b 100644
--- a/sysdeps/i386/sysdep.h
+++ b/sysdeps/i386/sysdep.h
@@ -109,22 +109,12 @@ lose: SYSCALL_PIC_SETUP							      \
 #define	PSEUDO_END(name)						      \
   END (name)
 
-#undef JUMPTARGET
-#ifdef PIC
-#define JUMPTARGET(name)	name##@PLT
-#define SYSCALL_PIC_SETUP \
-    pushl %ebx;								      \
-    cfi_adjust_cfa_offset (4);						      \
-    call 0f;								      \
-0:  popl %ebx;								      \
-    cfi_adjust_cfa_offset (-4);						      \
-    addl $_GLOBAL_OFFSET_TABLE+[.-0b], %ebx;
-
 # 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;					      \
+  .p2align 4;								      \
   .type __i686.get_pc_thunk.reg,@function;				      \
 __i686.get_pc_thunk.reg:						      \
   movl (%esp), %e##reg;							      \
@@ -137,6 +127,17 @@ __i686.get_pc_thunk.reg:						      \
 # define LOAD_PIC_REG(reg) \
   SETUP_PIC_REG(reg); addl $_GLOBAL_OFFSET_TABLE_, %e##reg
 
+#undef JUMPTARGET
+#ifdef PIC
+#define JUMPTARGET(name)	name##@PLT
+#define SYSCALL_PIC_SETUP \
+    pushl %ebx;								      \
+    cfi_adjust_cfa_offset (4);						      \
+    call 0f;								      \
+0:  popl %ebx;								      \
+    cfi_adjust_cfa_offset (-4);						      \
+    addl $_GLOBAL_OFFSET_TABLE+[.-0b], %ebx;
+
 #else
 #define JUMPTARGET(name)	name
 #define SYSCALL_PIC_SETUP	/* Nothing.  */