From 6a12504329bf3473c081d40c90a823e92d70af51 Mon Sep 17 00:00:00 2001 From: Stan Shebs Date: Fri, 8 Nov 2019 12:40:53 -0800 Subject: Add an LD_DEBUG=tls option to help debug thread-local storage handling in ld.so --- sysdeps/generic/ldsodefs.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'sysdeps/generic/ldsodefs.h') diff --git a/sysdeps/generic/ldsodefs.h b/sysdeps/generic/ldsodefs.h index 32647f8..0495f85 100644 --- a/sysdeps/generic/ldsodefs.h +++ b/sysdeps/generic/ldsodefs.h @@ -500,6 +500,8 @@ struct rtld_global_ro /* Google-local. */ #define DL_DEBUG_FASTLOAD (1 << 12) +#define DL_DEBUG_TLS (1 << 13) + /* OS version. */ EXTERN unsigned int _dl_osversion; /* Platform name. */ @@ -1196,6 +1198,9 @@ extern struct link_map *_dl_update_slotinfo (unsigned long int req_modid) but never touch anything. Return null if it's not allocated yet. */ extern void *_dl_tls_get_addr_soft (struct link_map *l) attribute_hidden; +/* Return an id for the current thread if possible, otherwise 0. */ +extern pid_t _dl_tls_tid (void) attribute_hidden; + extern int _dl_addr_inside_object (struct link_map *l, const ElfW(Addr) addr) attribute_hidden; -- cgit v1.1