From: Marco Elver Date: Wed, 24 May 2023 09:32:33 +0000 (+0200) Subject: [compiler-rt] Always use INTERCEPTOR()+ALIAS()+WRAP() to create interceptor alias X-Git-Tag: upstream/17.0.6~7411 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e522fe1ebe30f8d760097647e04646322cc0cdf1;p=platform%2Fupstream%2Fllvm.git [compiler-rt] Always use INTERCEPTOR()+ALIAS()+WRAP() to create interceptor alias Do not open code creation of an interceptor alias to another interceptor. Instead, use INTERCEPTOR() + ALIAS() + WRAP. Reviewed By: dvyukov Differential Revision: https://reviews.llvm.org/D151219 --- diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors.inc b/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors.inc index f1af744..db090d2 100644 --- a/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors.inc +++ b/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors.inc @@ -5487,9 +5487,7 @@ INTERCEPTOR(void *, __tls_get_addr, void *arg) { // On PowerPC, we also need to intercept __tls_get_addr_opt, which has // mostly the same semantics as __tls_get_addr, but its presence enables // some optimizations in linker (which are safe to ignore here). -extern "C" __attribute__((alias("__interceptor___tls_get_addr"), - visibility("default"))) -void *__tls_get_addr_opt(void *arg); +INTERCEPTOR(void *, __tls_get_addr_opt, void *arg) ALIAS(WRAP(__tls_get_addr)); #endif #else // SANITIZER_S390 // On s390, we have to intercept two functions here: