http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56393
--- Comment #25 from David Abdurachmanov <david.abdurachmanov at gmail dot com> --- I downloaded GCC 4.8.1 (final) and binutils 2.23.1 (default ld.gold). The problem is that boost and a lot other C/C++ packages are not compiled w/ ASan. One way would be to guarantee every single C/C++ RPM package correctly compiling w/ ASan (quite some effort). I prefer to instrument the main software (+ some critical C/C++ packages in future) for now. I assume I cannot use -static-libasan for shared objects (-shared) as PREINIT_ARRAY section would be a duplicate. Then -static-libasan should be only used for the final executable binary? I tried something like that: c++ -fsanitize=address -shared -Wl,-E -Wl,-z,defs -Wl,-v ./test.o -o libtest.so -static-libasan I see it doesn't pass to linker: <long_path>/lib64/libasan_preinit.o -Bstatic --whole-archive -lasan --no-whole-archive -Bdynamic And linker dies w/ undefined references of ASan. Do I need to make sure that **only** executable binaries gets ASan linked statically (-static-libasan)? (Thus they always have PREINIT_ARRAY section initializing ASan). david