[compiler-rt] 2477e69 - [ASan] Change optimized callbacks visibility to hidden.
Kirill Stoimenov via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 21 13:33:13 PST 2021
Author: Kirill Stoimenov
Date: 2021-12-21T21:32:30Z
New Revision: 2477e69c6df5ae172107107171b1f062b8c0c031
URL: https://github.com/llvm/llvm-project/commit/2477e69c6df5ae172107107171b1f062b8c0c031
DIFF: https://github.com/llvm/llvm-project/commit/2477e69c6df5ae172107107171b1f062b8c0c031.diff
LOG: [ASan] Change optimized callbacks visibility to hidden.
Making callbacks hidden will remove PLT calls.
Reviewed By: vitalybuka
Differential Revision: https://reviews.llvm.org/D116121
Added:
Modified:
compiler-rt/lib/asan/asan_interface.inc
compiler-rt/lib/asan/asan_rtl_x86_64.S
Removed:
################################################################################
diff --git a/compiler-rt/lib/asan/asan_interface.inc b/compiler-rt/lib/asan/asan_interface.inc
index 54ddfe5a26f04..89ef552b71173 100644
--- a/compiler-rt/lib/asan/asan_interface.inc
+++ b/compiler-rt/lib/asan/asan_interface.inc
@@ -180,36 +180,3 @@ INTERFACE_FUNCTION(__asan_update_allocation_context)
INTERFACE_WEAK_FUNCTION(__asan_default_options)
INTERFACE_WEAK_FUNCTION(__asan_default_suppressions)
INTERFACE_WEAK_FUNCTION(__asan_on_error)
-
-#if defined(__x86_64__) && !defined(__APPLE__) && !defined(SANITIZER_WINDOWS)
-
-# define ASAN_MEMORY_ACCESS_CALLBACK_ADD(s, reg, op) \
- INTERFACE_FUNCTION(__asan_check_##op##_add_##s##_##reg)
-
-# define ASAN_MEMORY_ACCESS_CALLBACKS_ADD(reg) \
- ASAN_MEMORY_ACCESS_CALLBACK_ADD(1, reg, load) \
- ASAN_MEMORY_ACCESS_CALLBACK_ADD(1, reg, store) \
- ASAN_MEMORY_ACCESS_CALLBACK_ADD(2, reg, load) \
- ASAN_MEMORY_ACCESS_CALLBACK_ADD(2, reg, store) \
- ASAN_MEMORY_ACCESS_CALLBACK_ADD(4, reg, load) \
- ASAN_MEMORY_ACCESS_CALLBACK_ADD(4, reg, store) \
- ASAN_MEMORY_ACCESS_CALLBACK_ADD(8, reg, load) \
- ASAN_MEMORY_ACCESS_CALLBACK_ADD(8, reg, store) \
- ASAN_MEMORY_ACCESS_CALLBACK_ADD(16, reg, load) \
- ASAN_MEMORY_ACCESS_CALLBACK_ADD(16, reg, store)
-
-ASAN_MEMORY_ACCESS_CALLBACKS_ADD(RAX)
-ASAN_MEMORY_ACCESS_CALLBACKS_ADD(RBX)
-ASAN_MEMORY_ACCESS_CALLBACKS_ADD(RCX)
-ASAN_MEMORY_ACCESS_CALLBACKS_ADD(RDX)
-ASAN_MEMORY_ACCESS_CALLBACKS_ADD(RSI)
-ASAN_MEMORY_ACCESS_CALLBACKS_ADD(RDI)
-ASAN_MEMORY_ACCESS_CALLBACKS_ADD(RBP)
-ASAN_MEMORY_ACCESS_CALLBACKS_ADD(R8)
-ASAN_MEMORY_ACCESS_CALLBACKS_ADD(R9)
-ASAN_MEMORY_ACCESS_CALLBACKS_ADD(R12)
-ASAN_MEMORY_ACCESS_CALLBACKS_ADD(R13)
-ASAN_MEMORY_ACCESS_CALLBACKS_ADD(R14)
-ASAN_MEMORY_ACCESS_CALLBACKS_ADD(R15)
-
-#endif // defined(__x86_64__)
diff --git a/compiler-rt/lib/asan/asan_rtl_x86_64.S b/compiler-rt/lib/asan/asan_rtl_x86_64.S
index 9dcb8627ba281..d27db745ed674 100644
--- a/compiler-rt/lib/asan/asan_rtl_x86_64.S
+++ b/compiler-rt/lib/asan/asan_rtl_x86_64.S
@@ -16,6 +16,7 @@
#define BEGINF(reg, op, s, i) \
.globl FNAME(reg, op, s, i) ;\
+.hidden FNAME(reg, op, s, i) ;\
ASM_TYPE_FUNCTION(FNAME(reg, op, s, i)) ;\
.cfi_startproc ;\
FNAME(reg, op, s, i): ;\
More information about the llvm-commits
mailing list