[PATCH] Make sanitizers' interceptors non-weak on FreeBSD

Kostya Serebryany kcc at google.com
Tue Jul 8 06:41:07 PDT 2014


================
Comment at: lib/interception/interception.h:142
@@ -141,4 +141,3 @@
 # define INTERCEPTOR_ATTRIBUTE __attribute__((visibility("default")))
-# define DECLARE_WRAPPER(ret_type, func, ...) \
-    extern "C" ret_type func(__VA_ARGS__) \
-    __attribute__((weak, alias("__interceptor_" #func), visibility("default")));
+# if defined(__FreeBSD__)
+// FreeBSD's dynamic linker (incompliantly) gives non-weak symbols higher
----------------
shouldn't we have #elif (__FreeBSD__) on the same level as other OSes (__APPLE__, _WIN32)?

http://reviews.llvm.org/D4418






More information about the llvm-commits mailing list