https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62105

--- Comment #2 from Julian Taylor <jtaylor.debian at googlemail dot com> ---
-whole-archive applies to static libraries, gcc links a shared library by
default
using -static-libtsan does not add libtsan at all:

$ gcc-4.10 test.c -static-libtsan -fsanitize=thread -v -fPIC -shared 2>&1 |
grep --color tsan
$ ldd -r a.out
undefined symbol: __tsan_init    (./a.out)
undefined symbol: __tsan_func_exit    (./a.out)
undefined symbol: __tsan_func_entry    (./a.out)
undefined symbol: __tsan_write8    (./a.out)
undefined symbol: __tsan_read8    (./a.out)

Reply via email to