Skip to content

Commit

Permalink
[asan] Explicitly declare memintrinsics interceptors to have C linkage
Browse files Browse the repository at this point in the history
This is needed on RTEMS.  Also update a comment.

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

llvm-svn: 332746
  • Loading branch information
googlewalt committed May 18, 2018
1 parent 1273f4a commit 0edca4f
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions compiler-rt/lib/asan/asan_interceptors_memintrinsics.cc
Expand Up @@ -33,12 +33,12 @@ void *__asan_memmove(void *to, const void *from, uptr size) {

#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

0 comments on commit 0edca4f

Please sign in to comment.