summaryrefslogtreecommitdiff
path: root/libsanitizer/hwasan/hwasan_preinit.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libsanitizer/hwasan/hwasan_preinit.cpp')
-rw-r--r--libsanitizer/hwasan/hwasan_preinit.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/libsanitizer/hwasan/hwasan_preinit.cpp b/libsanitizer/hwasan/hwasan_preinit.cpp
index 8c9c95f413b..8da47b5a2b7 100644
--- a/libsanitizer/hwasan/hwasan_preinit.cpp
+++ b/libsanitizer/hwasan/hwasan_preinit.cpp
@@ -14,10 +14,8 @@
#include "sanitizer_common/sanitizer_internal_defs.h"
#if SANITIZER_CAN_USE_PREINIT_ARRAY
-// The symbol is called __local_hwasan_preinit, because it's not intended to
-// be exported.
-// This code linked into the main executable when -fsanitize=hwaddress is in
-// the link flags. It can only use exported interface functions.
-__attribute__((section(".preinit_array"), used)) static void (
- *__local_hwasan_preinit)(void) = __hwasan_init;
+// This section is linked into the main executable when -fsanitize=hwaddress is
+// specified to perform initialization at a very early stage.
+__attribute__((section(".preinit_array"), used)) static auto preinit =
+ __hwasan_init;
#endif