[compiler-rt] r332746 - [asan] Explicitly declare memintrinsics interceptors to have C linkage

Walter Lee via llvm-commits llvm-commits at lists.llvm.org
Fri May 18 11:01:08 PDT 2018


Author: waltl
Date: Fri May 18 11:01:08 2018
New Revision: 332746

URL: http://llvm.org/viewvc/llvm-project?rev=332746&view=rev
Log:
[asan] Explicitly declare memintrinsics interceptors to have C linkage

This is needed on RTEMS.  Also update a comment.

Differential Revision: https://reviews.llvm.org/D47079

Modified:
    compiler-rt/trunk/lib/asan/asan_interceptors_memintrinsics.cc

Modified: compiler-rt/trunk/lib/asan/asan_interceptors_memintrinsics.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/asan_interceptors_memintrinsics.cc?rev=332746&r1=332745&r2=332746&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/asan_interceptors_memintrinsics.cc (original)
+++ compiler-rt/trunk/lib/asan/asan_interceptors_memintrinsics.cc Fri May 18 11:01:08 2018
@@ -33,12 +33,12 @@ void *__asan_memmove(void *to, const voi
 
 #if SANITIZER_FUCHSIA || SANITIZER_RTEMS
 
-// Fuchsia doesn't use sanitizer_common_interceptors.inc, but the only
-// things there it wants are these three.  Just define them as aliases
-// here rather than repeating the contents.
+// Fuchsia and RTEMS don't use sanitizer_common_interceptors.inc, but
+// the only things there it wants are these three.  Just define them
+// as aliases here rather than repeating the contents.
 
-decltype(__asan_memcpy) memcpy[[gnu::alias("__asan_memcpy")]];
-decltype(__asan_memmove) memmove[[gnu::alias("__asan_memmove")]];
-decltype(__asan_memset) memset[[gnu::alias("__asan_memset")]];
+extern "C" decltype(__asan_memcpy) memcpy[[gnu::alias("__asan_memcpy")]];
+extern "C" decltype(__asan_memmove) memmove[[gnu::alias("__asan_memmove")]];
+extern "C" decltype(__asan_memset) memset[[gnu::alias("__asan_memset")]];
 
 #endif  // SANITIZER_FUCHSIA || SANITIZER_RTEMS




More information about the llvm-commits mailing list