summaryrefslogtreecommitdiff
path: root/nptl/sysdeps/powerpc
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2005-12-20 07:21:59 +0000
committerUlrich Drepper <drepper@redhat.com>2005-12-20 07:21:59 +0000
commit00c2b3b91dc5f11924006ed4fb69d9d7442749b7 (patch)
treec367b0b7c66ba48cde11d2bd7bfe9c63e7b3ad49 /nptl/sysdeps/powerpc
parentfc3480d3eea6380ea00d150d87830dc3cb86ede8 (diff)
downloadglibc-00c2b3b91dc5f11924006ed4fb69d9d7442749b7.tar.gz
[BZ #1978]
2005-12-16 Thorsten Kukuk <kukuk@suse.de> [BZ #1978] * sysdeps/unix/sysv/linux/internal_statvfs.c (__statvfs_getflags): Map more filesystem types to a string. * sysdeps/unix/sysv/linux/linux_fsinfo.h: Add SYSFS_MAGIC. 2005-12-19 Jakub Jelinek <jakub@redhat.com> * locale/Makefile (programs/%-kw.h): Run $(GPERF) inside of the programs subdirectory. * sysdeps/powerpc/powerpc32/__longjmp-common.S (__longjmp): Use PTR_DEMANGLE for PC if defined. * sysdeps/powerpc/powerpc64/__longjmp-common.S (__longjmp): Likewise. * sysdeps/unix/sysv/linux/ia64/__longjmp.S (__longjmp): Likewise. * sysdeps/s390/s390-32/__longjmp.c (__longjmp): Xor %r14 with THREAD_GET_POINTER_GUARD () if PTR_DEMANGLE is defined. * sysdeps/s390/s390-64/__longjmp.c (__longjmp): Likewise. * sysdeps/powerpc/powerpc32/setjmp-common.S (__sigsetjmp): Use PTR_MANGLE for PC if defined. * sysdeps/powerpc/powerpc64/setjmp-common.S (__sigsetjmp): Likewise. * sysdeps/s390/s390-32/setjmp.S (__sigsetjmp): Likewise. Avoid call to __sigjmp_save if IS_IN_rtld. * sysdeps/s390/s390-32/elf/setjmp.S (__sigsetjmp): Likewise. * sysdeps/s390/s390-64/setjmp.S (__sigsetjmp): Likewise. * sysdeps/s390/s390-64/elf/setjmp.S (__sigsetjmp): Likewise. * sysdeps/unix/sysv/linux/ia64/setjmp.S (__sigsetjmp): Likewise. * sysdeps/unix/sysv/linux/ia64/sysdep.h (PTR_MANGLE, PTR_DEMANGLE): Define. * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep.h: Include tls.h. (PTR_MANGLE, PTR_DEMANGLE): Define. * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h: Include tls.h (PTR_MANGLE, PTR_DEMANGLE): Define. * sysdeps/unix/sysv/linux/s390/s390-32/sysdep.h: Include tls.h. (PTR_MANGLE, PTR_DEMANGLE): Define. (SYSCALL_ERROR_HANDLER): Add missing semicolons. * sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h: Include tls.h. (PTR_MANGLE, PTR_DEMANGLE): Define. * sysdeps/unix/sysv/linux/s390/s390-64/socket.S (__socket): Add SYSCALL_ERROR_HANDLER. 2005-12-19 Ulrich Drepper <drepper@redhat.com> * sysdeps/unix/sysv/linux/sparc/sparc32/socket.S: Handle NO_WEAK_ALIAS. * sysdeps/unix/sysv/linux/sparc/sparc64/socket.S: Likewise. Patch by Clint Adams. 2005-12-16 Martin Schwidefsky <schwidefsky@de.ibm.com> * sysdeps/unix/sysv/linux/s390/sys/user.h: Copy struct user and dependent definitions from the kernel header to sys/user.h and remove the #include of asm/user.h.
Diffstat (limited to 'nptl/sysdeps/powerpc')
-rw-r--r--nptl/sysdeps/powerpc/tcb-offsets.sym1
-rw-r--r--nptl/sysdeps/powerpc/tls.h15
2 files changed, 15 insertions, 1 deletions
diff --git a/nptl/sysdeps/powerpc/tcb-offsets.sym b/nptl/sysdeps/powerpc/tcb-offsets.sym
index 3962edbd54..4a8671e802 100644
--- a/nptl/sysdeps/powerpc/tcb-offsets.sym
+++ b/nptl/sysdeps/powerpc/tcb-offsets.sym
@@ -14,3 +14,4 @@ MULTIPLE_THREADS_OFFSET thread_offsetof (header.multiple_threads)
#endif
PID thread_offsetof (pid)
TID thread_offsetof (tid)
+POINTER_GUARD (offsetof (tcbhead_t, pointer_guard) - TLS_TCB_OFFSET - sizeof (tcbhead_t))
diff --git a/nptl/sysdeps/powerpc/tls.h b/nptl/sysdeps/powerpc/tls.h
index b2322b09bd..976a271362 100644
--- a/nptl/sysdeps/powerpc/tls.h
+++ b/nptl/sysdeps/powerpc/tls.h
@@ -66,9 +66,11 @@ typedef union dtv
# include <nptl/descr.h>
/* The stack_guard is accessed directly by GCC -fstack-protector code,
- so it is a part of public ABI. The dtv field is private. */
+ so it is a part of public ABI. The dtv and pointer_guard fields
+ are private. */
typedef struct
{
+ uintptr_t pointer_guard;
uintptr_t stack_guard;
dtv_t *dtv;
} tcbhead_t;
@@ -166,6 +168,17 @@ register void *__thread_register __asm__ ("r13");
= ((tcbhead_t *) ((char *) __thread_register \
- TLS_TCB_OFFSET))[-1].stack_guard)
+/* Set the stack guard field in TCB head. */
+# define THREAD_GET_POINTER_GUARD() \
+ (((tcbhead_t *) ((char *) __thread_register \
+ - TLS_TCB_OFFSET))[-1].pointer_guard)
+# define THREAD_SET_POINTER_GUARD(value) \
+ (THREAD_GET_POINTER_GUARD () = (value))
+# define THREAD_COPY_POINTER_GUARD(descr) \
+ (((tcbhead_t *) ((char *) (descr) \
+ + TLS_PRE_TCB_SIZE))[-1].pointer_guard \
+ = THREAD_GET_POINTER_GUARD())
+
/* l_tls_offset == 0 is perfectly valid on PPC, so we have to use some
different value to mean unset l_tls_offset. */
# define NO_TLS_OFFSET -1