diff options
author | Roland McGrath <roland@gnu.org> | 2003-03-02 11:41:46 +0000 |
---|---|---|
committer | Roland McGrath <roland@gnu.org> | 2003-03-02 11:41:46 +0000 |
commit | 3093b1c70cd227c3329d2bbb77cd59ce2cbdcbd4 (patch) | |
tree | a2fecd76b7adaa0049c2bdbf26a0a1337a46016e | |
parent | 816a5a6a690da9d5b60571e8f8a9bdc3297a3575 (diff) | |
download | glibc-3093b1c70cd227c3329d2bbb77cd59ce2cbdcbd4.zip glibc-3093b1c70cd227c3329d2bbb77cd59ce2cbdcbd4.tar.gz glibc-3093b1c70cd227c3329d2bbb77cd59ce2cbdcbd4.tar.bz2 |
2003-03-02 Roland McGrath <roland@redhat.com>
* sysdeps/powerpc/dl-tls.h (TLS_TP_OFFSET, TLS_DTV_OFFSET): Move these
macros out of [SHARED].
(TLS_TPREL_VALUE, TLS_DTPREL_VALUE): New macros.
-rw-r--r-- | sysdeps/powerpc/dl-tls.h | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/sysdeps/powerpc/dl-tls.h b/sysdeps/powerpc/dl-tls.h index 37b9674..2f84a57 100644 --- a/sysdeps/powerpc/dl-tls.h +++ b/sysdeps/powerpc/dl-tls.h @@ -25,19 +25,25 @@ typedef struct unsigned long int ti_offset; } tls_index; - -#ifdef SHARED - -extern void *__tls_get_addr (tls_index *ti); - /* The thread pointer points 0x7000 past the first static TLS block. */ -# define TLS_TP_OFFSET 0x7000 +#define TLS_TP_OFFSET 0x7000 /* Dynamic thread vector pointers point 0x8000 past the start of each TLS block. */ -# define TLS_DTV_OFFSET 0x8000 +#define TLS_DTV_OFFSET 0x8000 + +/* Compute the value for a @tprel reloc. */ +#define TLS_TPREL_VALUE(sym_map, sym, reloc) \ + ((sym_map)->l_tls_offset + (sym)->st_value + (reloc)->r_addend \ + - TLS_TCB_SIZE - TLS_TP_OFFSET) + +/* Compute the value for a @dtprel reloc. */ +#define TLS_DTPREL_VALUE(sym, reloc) \ + ((sym)->st_value + (reloc)->r_addend - TLS_DTV_OFFSET) + +#ifdef SHARED +extern void *__tls_get_addr (tls_index *ti); # define GET_ADDR_OFFSET (ti->ti_offset + TLS_DTV_OFFSET) # define __TLS_GET_ADDR(__ti) (__tls_get_addr (__ti) - TLS_DTV_OFFSET) - #endif |