+2002-12-12 Ulrich Drepper <drepper@redhat.com>
+
+ * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Correct
+ access to __libc_locking_needed for PIC.
+
2002-12-12 Jakub Jelinek <jakub@redhat.com>
* sysdeps/pthread/bits/libc-lock.h (__libc_locking_needed): Only
orl $-1, %eax /* Load -1. */
#ifndef UP
+# ifdef PIC
+ call __i686.get_pc_thunk.bx
+ addl $_GLOBAL_OFFSET_TABLE_, %ebx
+ cmpl $0, __libc_locking_needed@GOTOFF(%ebx)
+# else
cmpl $0, __libc_locking_needed
+# endif
je,pt 0f
lock
0:
movl 20(%esp), %ebx
#ifndef UP
+# ifdef PIC
+ call __i686.get_pc_thunk.bx
+ addl $_GLOBAL_OFFSET_TABLE_, %ebx
+ cmpl $0, __libc_locking_needed@GOTOFF(%ebx)
+# else
cmpl $0, __libc_locking_needed
+# endif
je,pt 0f
lock
0:
6: movl $ETIMEDOUT, %eax
jmp 3b
.size __lll_timedwait_tid,.-__lll_timedwait_tid
+
+
+ .section .gnu.linkonce.t.__i686.get_pc_thunk.bx,"ax",@progbits
+ .globl __i686.get_pc_thunk.bx
+ .hidden __i686.get_pc_thunk.bx
+ .type __i686.get_pc_thunk.bx,@function
+__i686.get_pc_thunk.bx:
+ movl (%esp), %ebx
+ ret