diff options
author | Marco Elver <elver@google.com> | 2023-06-07 13:07:44 +0200 |
---|---|---|
committer | Marco Elver <elver@google.com> | 2023-06-07 13:09:43 +0200 |
commit | 1cec9f8dc893a6aef8e306a49f11d49d5f9c9275 (patch) | |
tree | 54a067e66f74bb4324317aab236e7b65896aabcd | |
parent | 593a2740f7a499e35f19e64d180d0b8246b52ba3 (diff) | |
download | llvm-1cec9f8dc893a6aef8e306a49f11d49d5f9c9275.zip llvm-1cec9f8dc893a6aef8e306a49f11d49d5f9c9275.tar.gz llvm-1cec9f8dc893a6aef8e306a49f11d49d5f9c9275.tar.bz2 |
[sanitizer_common] Use interception macros for s390 __tls_get_addr declarations
NFC.
-rw-r--r-- | compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors.inc | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors.inc b/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors.inc index efd7c75..ff96a41 100644 --- a/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors.inc +++ b/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors.inc @@ -5417,21 +5417,20 @@ INTERCEPTOR(uptr, __tls_get_addr_internal, void *arg) { #if SANITIZER_S390 && \ (SANITIZER_INTERCEPT_TLS_GET_ADDR || SANITIZER_INTERCEPT_TLS_GET_OFFSET) -extern "C" uptr __tls_get_offset(void *arg); -extern "C" uptr __interceptor___tls_get_offset(void *arg); // We need a hidden symbol aliasing the above, so that we can jump // directly to it from the assembly below. -extern "C" __attribute__((alias("__interceptor___tls_get_addr_internal"), - visibility("hidden"))) -uptr __tls_get_addr_hidden(void *arg); +extern "C" __attribute__((visibility("hidden"))) uptr __tls_get_addr_hidden( + void *arg) ALIAS(WRAP(__tls_get_addr_internal)); +extern "C" uptr __tls_get_offset(void *arg); +extern "C" uptr TRAMPOLINE(__tls_get_offset)(void *arg); +extern "C" uptr WRAP(__tls_get_offset)(void *arg); // Now carefully intercept __tls_get_offset. asm( ".text\n" // The __intercept_ version has to exist, so that gen_dynamic_list.py // exports our symbol. ".weak __tls_get_offset\n" - ".type __tls_get_offset, @function\n" - "__tls_get_offset:\n" + ".set __tls_get_offset, __interceptor___tls_get_offset\n" ".global __interceptor___tls_get_offset\n" ".type __interceptor___tls_get_offset, @function\n" "__interceptor___tls_get_offset:\n" |