summaryrefslogtreecommitdiff
path: root/nptl
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2005-04-14 21:46:37 +0000
committerUlrich Drepper <drepper@redhat.com>2005-04-14 21:46:37 +0000
commitedac0e8f443c332821a63e4f26e298a1622827fe (patch)
tree120a94bb8e7ff4f2fd6bc9975ea3c20758596eda /nptl
parent506cbf1f43a3bba63b9f4dd6d5a9a1d15f0dcf2c (diff)
Add sparc64 TLS and NPTL support.
* elf/tls-macros.h: Add Sparc64 defines. * sysdeps/sparc/sparc64/dl-machine.h (sparc64_fixup_plt): Mark as always_inline. (elf_machine_fixup_plt): Likewise. (elf_machine_rela): Handle TLS relocations. (elf_machine_type_cleaa): Likewise. * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep.h (SYSCALL_ERROR_HANDLER_ENTRY): Use sethi/or for GOT reloc. It does not always fit in R_SPARC_GOT13 when building -fPIC. Also, add TLS handling. * sysdeps/unix/sysv/linux/configure.in (arch_minimum_kernel): Increase it to 2.4.21 for sparc64. * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: NULL terminate backtrace by zero'ing out %fp. Store away flags, func_ptr, and func_arg in global registers not local registers. * sysdeps/unix/sysv/linux/sparc/sparc64/clone.S: Handle PTID, TLS, and CTID arguments properly. Add RESET_PID handling. * sysdeps/unix/sysv/linux/sparc/sparc64/pause.c: Rework so that we do not invoke __sigprocmask(). We can always assume rt signals are present on sparc64, so just do an inline syscall. 2005-04-13 Jakub Jelinek <jakub@redhat.com> * sysdeps/sparc/sparc64/dl-machine.h: Add dl_machine_h multiple inclusion guard for the first half of the header. (elf_machine_type_class, ELF_MACHINE_JMP_SLOT, ELF_MACHINE_NO_REL, ELF_MACHINE_PLTREL_OVERLAP, elf_machine_runtime_setup, elf_machine_relplt, DL_STACK_END, RTLD_START): Move into the #ifndef dl_machine_h guarded part of the header.
Diffstat (limited to 'nptl')
-rw-r--r--nptl/ChangeLog5
-rw-r--r--nptl/sysdeps/sparc/sparc64/jmpbuf-unwind.h31
-rw-r--r--nptl/sysdeps/unix/sysv/linux/sparc/sparc64/clone.S2
3 files changed, 38 insertions, 0 deletions
diff --git a/nptl/ChangeLog b/nptl/ChangeLog
index 96b35d6958..8de78a3ccd 100644
--- a/nptl/ChangeLog
+++ b/nptl/ChangeLog
@@ -1,3 +1,8 @@
+2005-04-13 David S. Miller <davem@davemloft.net>
+
+ * sysdeps/sparc/sparc64/jmpbuf-unwind.h: New file.
+ * sysdeps/sparc/sparc64/clone.S: New file.
+
2005-04-05 Jakub Jelinek <jakub@redhat.com>
* sysdeps/pthread/pthread.h (__pthread_cleanup_routine): Use
diff --git a/nptl/sysdeps/sparc/sparc64/jmpbuf-unwind.h b/nptl/sysdeps/sparc/sparc64/jmpbuf-unwind.h
new file mode 100644
index 0000000000..77321aad3f
--- /dev/null
+++ b/nptl/sysdeps/sparc/sparc64/jmpbuf-unwind.h
@@ -0,0 +1,31 @@
+/* Copyright (C) 2005 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by David S. Miller <davem@davemloft.net>, 2005.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <setjmp.h>
+#include <stdint.h>
+#include <unwind.h>
+
+#define _JMPBUF_CFA_UNWINDS_ADJ(_jmpbuf, _context, _adj) \
+ _JMPBUF_UNWINDS_ADJ (_jmpbuf, (void *) _Unwind_GetCFA (_context), _adj)
+
+#define _JMPBUF_UNWINDS_ADJ(_jmpbuf, _address, _adj) \
+ ((uintptr_t) (_address) - (_adj) < (uintptr_t) (_jmpbuf)[0].uc_mcontext.mc_fp - (_adj))
+
+/* We use the normal lobngjmp for unwinding. */
+#define __libc_unwind_longjmp(buf, val) __libc_longjmp (buf, val)
diff --git a/nptl/sysdeps/unix/sysv/linux/sparc/sparc64/clone.S b/nptl/sysdeps/unix/sysv/linux/sparc/sparc64/clone.S
new file mode 100644
index 0000000000..410f32017a
--- /dev/null
+++ b/nptl/sysdeps/unix/sysv/linux/sparc/sparc64/clone.S
@@ -0,0 +1,2 @@
+#define RESET_PID
+#include <sysdeps/unix/sysv/linux/sparc/sparc64/clone.S>