From edac0e8f443c332821a63e4f26e298a1622827fe Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 14 Apr 2005 21:46:37 +0000 Subject: 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 * 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. --- nptl/ChangeLog | 5 ++++ nptl/sysdeps/sparc/sparc64/jmpbuf-unwind.h | 31 ++++++++++++++++++++++ nptl/sysdeps/unix/sysv/linux/sparc/sparc64/clone.S | 2 ++ 3 files changed, 38 insertions(+) create mode 100644 nptl/sysdeps/sparc/sparc64/jmpbuf-unwind.h create mode 100644 nptl/sysdeps/unix/sysv/linux/sparc/sparc64/clone.S (limited to 'nptl') diff --git a/nptl/ChangeLog b/nptl/ChangeLog index 96b35d6..8de78a3 100644 --- a/nptl/ChangeLog +++ b/nptl/ChangeLog @@ -1,3 +1,8 @@ +2005-04-13 David S. Miller + + * sysdeps/sparc/sparc64/jmpbuf-unwind.h: New file. + * sysdeps/sparc/sparc64/clone.S: New file. + 2005-04-05 Jakub Jelinek * 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 0000000..77321aa --- /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 , 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 +#include +#include + +#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 0000000..410f320 --- /dev/null +++ b/nptl/sysdeps/unix/sysv/linux/sparc/sparc64/clone.S @@ -0,0 +1,2 @@ +#define RESET_PID +#include -- cgit v1.1