diff options
author | Jakub Jelinek <jakub@redhat.com> | 2009-04-15 16:37:06 +0000 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2009-04-15 16:37:06 +0000 |
commit | dc3be966c0050d3847ab528387801b9c93a2f831 (patch) | |
tree | 425ea50195684e38e91a72767d645d5fd1ee2e3a /sysdeps/sh | |
parent | ded8b949ca91eae8bfcc9d3337913dda620416b3 (diff) |
Updated to fedora-glibc-20090415T1619cvs/fedora-glibc-2_9_90-17
Diffstat (limited to 'sysdeps/sh')
-rw-r--r-- | sysdeps/sh/bits/setjmp.h | 4 | ||||
-rw-r--r-- | sysdeps/sh/libc-tls.c | 33 |
2 files changed, 35 insertions, 2 deletions
diff --git a/sysdeps/sh/bits/setjmp.h b/sysdeps/sh/bits/setjmp.h index 7e3fbd3394..6196abedd6 100644 --- a/sysdeps/sh/bits/setjmp.h +++ b/sysdeps/sh/bits/setjmp.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1999,2000,2003,2005,2006 Free Software Foundation, Inc. +/* Copyright (C) 1999,2000,2003,2005,2006,2009 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -25,7 +25,7 @@ #endif #ifndef _ASM -typedef struct +typedef struct __jmp_buf_internal_tag { /* Callee-saved registers r8 through r15. */ int __regs[8]; diff --git a/sysdeps/sh/libc-tls.c b/sysdeps/sh/libc-tls.c new file mode 100644 index 0000000000..1a7db55c50 --- /dev/null +++ b/sysdeps/sh/libc-tls.c @@ -0,0 +1,33 @@ +/* Thread-local storage handling in the ELF dynamic linker. SH version. + Copyright (C) 2009 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + 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 <csu/libc-tls.c> +#include <dl-tls.h> + +/* On SH, linker optimizations are not required, so __tls_get_addr + can be called even in statically linked binaries. In this case module + must be always 1 and PT_TLS segment exist in the binary, otherwise it + would not link. */ + +void * +__tls_get_addr (tls_index *ti) +{ + dtv_t *dtv = THREAD_DTV (); + return (char *) dtv[1].pointer.val + ti->ti_offset; +} |