diff options
Diffstat (limited to 'sysdeps/unix/i386/sysdep.S')
-rw-r--r-- | sysdeps/unix/i386/sysdep.S | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/sysdeps/unix/i386/sysdep.S b/sysdeps/unix/i386/sysdep.S index 6056cbeef2..83ce3eadec 100644 --- a/sysdeps/unix/i386/sysdep.S +++ b/sysdeps/unix/i386/sysdep.S @@ -47,7 +47,12 @@ notb: #endif #ifndef PIC # if USE___THREAD +# ifndef NO_TLS_DIRECT_SEG_REFS movl %eax, %gs:C_SYMBOL_NAME(errno@NTPOFF) +# else + movl %gs:0, %ecx + movl %eax, C_SYMBOL_NAME(errno@NTPOFF)(%ecx) +# endif # elif !defined _LIBC_REENTRANT movl %eax, C_SYMBOL_NAME(errno) # else @@ -66,7 +71,12 @@ notb: /* Pop %ebx value saved before jumping here. */ popl %ebx +# ifndef NO_TLS_DIRECT_SEG_REFS + addl %gs:0, %ecx + movl %eax, (%ecx) +# else movl %eax, %gs:0(%ecx) +# endif # elif RTLD_PRIVATE_ERRNO movl %eax, C_SYMBOL_NAME(rtld_errno@GOTOFF)(%ebx) |