forked from OSchip/llvm-project
tsan: remove static reference to glibc internal _dl_get_tls_static_info()
(this breaks RPM packages) llvm-svn: 171033
This commit is contained in:
parent
2eda23e78a
commit
f6d8021520
|
@ -172,18 +172,14 @@ static uptr g_tls_size;
|
|||
#else
|
||||
# define INTERNAL_FUNCTION
|
||||
#endif
|
||||
extern "C" void _dl_get_tls_static_info(size_t*, size_t*)
|
||||
__attribute__((weak)) INTERNAL_FUNCTION;
|
||||
|
||||
static int InitTlsSize() {
|
||||
typedef void (*get_tls_func)(size_t*, size_t*) INTERNAL_FUNCTION;
|
||||
get_tls_func get_tls = &_dl_get_tls_static_info;
|
||||
if (get_tls == 0) {
|
||||
void *get_tls_static_info_ptr = dlsym(RTLD_NEXT, "_dl_get_tls_static_info");
|
||||
CHECK_EQ(sizeof(get_tls), sizeof(get_tls_static_info_ptr));
|
||||
internal_memcpy(&get_tls, &get_tls_static_info_ptr,
|
||||
sizeof(get_tls_static_info_ptr));
|
||||
}
|
||||
get_tls_func get_tls;
|
||||
void *get_tls_static_info_ptr = dlsym(RTLD_NEXT, "_dl_get_tls_static_info");
|
||||
CHECK_EQ(sizeof(get_tls), sizeof(get_tls_static_info_ptr));
|
||||
internal_memcpy(&get_tls, &get_tls_static_info_ptr,
|
||||
sizeof(get_tls_static_info_ptr));
|
||||
CHECK_NE(get_tls, 0);
|
||||
size_t tls_size = 0;
|
||||
size_t tls_align = 0;
|
||||
|
|
Loading…
Reference in New Issue