diff options
author | Max Filippov <jcmvbkbc@gmail.com> | 2024-06-01 03:39:03 -0700 |
---|---|---|
committer | Waldemar Brodkorb <wbx@openadk.org> | 2024-06-04 16:40:42 +0200 |
commit | 138274e92a01be8a98392489b1a2f497ab11c201 (patch) | |
tree | f0be841a1e915e86d4215326a13654f8034632a4 /libpthread/nptl/sysdeps/xtensa | |
parent | 8bb33a2e1f2baec2078581d77e181f1ead5f51aa (diff) |
xtensa: add FDPIC support
This change implements Xtensa FDPIC ABI as specified in the first
version of the following document:
https://github.com/jcmvbkbc/xtensa-abi/blob/master/fdpic-xtensa.txt
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Diffstat (limited to 'libpthread/nptl/sysdeps/xtensa')
-rw-r--r-- | libpthread/nptl/sysdeps/xtensa/dl-tls.h | 33 |
1 files changed, 24 insertions, 9 deletions
diff --git a/libpthread/nptl/sysdeps/xtensa/dl-tls.h b/libpthread/nptl/sysdeps/xtensa/dl-tls.h index adc02d74a..5fc4ea2d0 100644 --- a/libpthread/nptl/sysdeps/xtensa/dl-tls.h +++ b/libpthread/nptl/sysdeps/xtensa/dl-tls.h @@ -28,6 +28,29 @@ typedef struct extern void *__tls_get_addr (tls_index *ti); +/* Type used as the argument in a TLS descriptor for a symbol that + needs dynamic TLS offsets. */ +struct tlsdesc_dynamic_arg +{ + tls_index tlsinfo; + size_t gen_count; +}; + +#ifdef __FDPIC__ +/* Type used to represent a TLS descriptor. */ +struct tlsdesc +{ + ptrdiff_t (*entry)(struct tlsdesc *); + void *argument; +}; + +extern ptrdiff_t attribute_hidden + _dl_tlsdesc_return(struct tlsdesc *); + +extern void *_dl_make_tlsdesc_dynamic (struct link_map *map, size_t ti_offset); +extern ptrdiff_t attribute_hidden + _dl_tlsdesc_dynamic(struct tlsdesc *); +#else /* Type used to represent a TLS descriptor. */ struct tlsdesc { @@ -39,19 +62,11 @@ struct tlsdesc ptrdiff_t (*entry)(struct tlsdesc *); }; -/* Type used as the argument in a TLS descriptor for a symbol that - needs dynamic TLS offsets. */ -struct tlsdesc_dynamic_arg -{ - tls_index tlsinfo; - size_t gen_count; -}; - extern ptrdiff_t attribute_hidden _dl_tlsdesc_return(struct tlsdesc_dynamic_arg *); extern void *_dl_make_tlsdesc_dynamic (struct link_map *map, size_t ti_offset); extern ptrdiff_t attribute_hidden _dl_tlsdesc_dynamic(struct tlsdesc_dynamic_arg *); - +#endif #endif |