[PATCH] D55703: Reimplement Thread Static Data MSan routines for NetBSD
Kamil Rytarowski via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 14 14:35:30 PST 2018
krytarowski added a comment.
> On Fri, Dec 14, 2018 at 01:23:20PM +0000, Kamil Rytarowski via Phabricator wrote:
>
>> Index: lib/msan/msan_linux.cc
>> ===================================================================
>>
>> - lib/msan/msan_linux.cc +++ lib/msan/msan_linux.cc @@ -34,6 +34,13 @@ #include "sanitizer_common/sanitizer_common.h" #include "sanitizer_common/sanitizer_procmaps.h"
>>
>> +#if SANITIZER_NETBSD +#include <sys/cdefs.h> +extern "C" { +int __cxa_thread_atexit(void (*)(void *), void *, void *) __weak; +} +#endif +
>
> What's the point of declaring it weak when it is used unconditionally?
>
> Joerg
For some reason, without __weak it didn't build.
[100%] Built target c-arcmt-test
CMakeFiles/RTAsan_dynamic.i386.dir/asan_posix.cc.o: In function `__asan::AsanTSDSet(void*)':
/public/llvm/projects/compiler-rt/lib/asan/asan_posix.cc:78: undefined reference to `__cxa_thread_atexit(void (*)(void*), void*, void*)'
CMakeFiles/RTAsan_dynamic.x86_64.dir/asan_posix.cc.o: In function `__asan::AsanTSDSet(void*)':
/public/llvm/projects/compiler-rt/lib/asan/asan_posix.cc:78: undefined reference to `__cxa_thread_atexit(void (*)(void*), void*, void*)'
clang-7: error: linker command failed with exit code 1 (use -v to see invocation)
--- lib/clang/8.0.0/lib/netbsd/libclang_rt.asan-i386.so ---
*** [lib/clang/8.0.0/lib/netbsd/libclang_rt.asan-i386.so] Error code 1
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D55703/new/
https://reviews.llvm.org/D55703
More information about the llvm-commits
mailing list