1 From 1f674977c0f3ea1e67deea93fa8f4e795cc869ad Mon Sep 17 00:00:00 2001
2 From: Timo Teräs <timo.teras@iki.fi>
3 Date: Tue, 07 Dec 2010 09:27:29 +0000
4 Subject: nptl: fix Unwind_Resume PLT calls
6 My change a49b3a18e463cbe8c94c41501e386e7f4c61609e fixed two
7 Unwind_Resume calls to go via PLT to avoid text relocations for PIC
8 builds. However, it looks the reason for upstream not using PLT calls
9 is that ebx gets clobbered. So we need to reload it.
11 Signed-off-by: Timo Teräs <timo.teras@iki.fi>
12 Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
14 diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S b/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
15 index ac7983c..3b61367 100644
16 --- a/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
17 +++ b/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
18 @@ -648,6 +648,10 @@ __condvar_tw_cleanup:
23 + call __i686.get_pc_thunk.bx
24 + addl $_GLOBAL_OFFSET_TABLE_, %ebx
26 call _Unwind_Resume@PLT
29 diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S b/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
30 index abc963f..a1294c5 100644
31 --- a/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
32 +++ b/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
33 @@ -535,6 +535,10 @@ __condvar_w_cleanup:
38 + call __i686.get_pc_thunk.bx
39 + addl $_GLOBAL_OFFSET_TABLE_, %ebx
41 call _Unwind_Resume@PLT
44 @@ -569,14 +573,14 @@ __condvar_w_cleanup:
48 - .section .gnu.linkonce.t.__i686.get_pc_thunk.cx,"ax",@progbits
49 - .globl __i686.get_pc_thunk.cx
50 - .hidden __i686.get_pc_thunk.cx
51 - .type __i686.get_pc_thunk.cx,@function
52 -__i686.get_pc_thunk.cx:
54 + .section .gnu.linkonce.t.__i686.get_pc_thunk.bx,"ax",@progbits
55 + .globl __i686.get_pc_thunk.bx
56 + .hidden __i686.get_pc_thunk.bx
57 + .type __i686.get_pc_thunk.bx,@function
58 +__i686.get_pc_thunk.bx:
61 - .size __i686.get_pc_thunk.cx,.-__i686.get_pc_thunk.cx
62 + .size __i686.get_pc_thunk.bx,.-__i686.get_pc_thunk.bx