From d3014e1f3b8289dad35475942f9bcf39403576eb Mon Sep 17 00:00:00 2001 From: Vitaly Buka Date: Mon, 16 Sep 2024 11:00:13 -0700 Subject: [PATCH] [NFC][sanitizer] Use RTLD_DEFAULT for _dl_get_tls_static_info (#108723) We don't intercept this one, no reason to use RTLD_NEXT. Co-authored-by: Sam Elliott --- compiler-rt/lib/sanitizer_common/sanitizer_linux_libcdep.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_linux_libcdep.cpp b/compiler-rt/lib/sanitizer_common/sanitizer_linux_libcdep.cpp index 61bbd3ae3b7c3c..c6d62a156dec47 100644 --- a/compiler-rt/lib/sanitizer_common/sanitizer_linux_libcdep.cpp +++ b/compiler-rt/lib/sanitizer_common/sanitizer_linux_libcdep.cpp @@ -232,7 +232,7 @@ void InitTlsSize() { # if defined(__aarch64__) || defined(__x86_64__) || \ defined(__powerpc64__) || defined(__loongarch__) - void *get_tls_static_info = dlsym(RTLD_NEXT, "_dl_get_tls_static_info"); + void *get_tls_static_info = dlsym(RTLD_DEFAULT, "_dl_get_tls_static_info"); size_t tls_align; ((void (*)(size_t *, size_t *))get_tls_static_info)(&g_tls_size, &tls_align); # endif