mirror of
https://sourceware.org/git/glibc.git
synced 2025-01-10 19:30:10 +00:00
m68k: TLS reference to errno in syscall stubs
This commit is contained in:
parent
7d6cb729ed
commit
dbd0094b3f
@ -1,3 +1,8 @@
|
||||
2010-03-13 Andreas Schwab <schwab@linux-m68k.org>
|
||||
|
||||
* sysdeps/unix/sysv/linux/m68k/sysdep.h (SYSCALL_ERROR_HANDLER):
|
||||
Add variant for USE__THREAD.
|
||||
|
||||
2010-03-12 Andreas Schwab <schwab@linux-m68k.org>
|
||||
|
||||
* sysdeps/unix/sysv/linux/m68k/nptl/lowlevellock.h: Don't include
|
||||
|
@ -111,9 +111,26 @@ SYSCALL_ERROR_LABEL: \
|
||||
a pointer (e.g., mmap). */ \
|
||||
move.l %d0, %a0; \
|
||||
rts;
|
||||
# else /* !RTLD_PRIVATE_ERRNO */
|
||||
/* Store (- %d0) into errno through the GOT. */
|
||||
# if defined _LIBC_REENTRANT
|
||||
# elif USE___THREAD
|
||||
# ifndef NOT_IN_libc
|
||||
# define SYSCALL_ERROR_ERRNO __libc_errno
|
||||
# else
|
||||
# define SYSCALL_ERROR_ERRNO errno
|
||||
# endif
|
||||
# define SYSCALL_ERROR_HANDLER \
|
||||
SYSCALL_ERROR_LABEL: \
|
||||
neg.l %d0; \
|
||||
move.l %d0, -(%sp); \
|
||||
jbsr __m68k_read_tp@PLTPC; \
|
||||
lea (_GLOBAL_OFFSET_TABLE_@GOTPC, %pc), %a1; \
|
||||
add.l (SYSCALL_ERROR_ERRNO@TLSIE, %a1), %a0; \
|
||||
move.l (%sp)+, (%a0); \
|
||||
move.l &-1, %d0; \
|
||||
/* Copy return value to %a0 for syscalls that are declared to return \
|
||||
a pointer (e.g., mmap). */ \
|
||||
move.l %d0, %a0; \
|
||||
rts;
|
||||
# elif defined _LIBC_REENTRANT
|
||||
# define SYSCALL_ERROR_HANDLER \
|
||||
SYSCALL_ERROR_LABEL: \
|
||||
neg.l %d0; \
|
||||
@ -126,6 +143,7 @@ SYSCALL_ERROR_LABEL: \
|
||||
move.l %d0, %a0; \
|
||||
rts;
|
||||
# else /* !_LIBC_REENTRANT */
|
||||
/* Store (- %d0) into errno through the GOT. */
|
||||
# define SYSCALL_ERROR_HANDLER \
|
||||
SYSCALL_ERROR_LABEL: \
|
||||
move.l (errno@GOTPC, %pc), %a0; \
|
||||
@ -137,7 +155,6 @@ SYSCALL_ERROR_LABEL: \
|
||||
move.l %d0, %a0; \
|
||||
rts;
|
||||
# endif /* _LIBC_REENTRANT */
|
||||
# endif /* RTLD_PRIVATE_ERRNO */
|
||||
#else
|
||||
# define SYSCALL_ERROR_HANDLER /* Nothing here; code in sysdep.S is used. */
|
||||
#endif /* PIC */
|
||||
|
Loading…
Reference in New Issue
Block a user