http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55354
--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-11-16 20:46:35 UTC --- For TLS, you can just use -ftls-model=initial-exec or __attribute__((tls_model ("initial-exec"))). libasan from what I can see doesn't use TLS at all, and you really can't just have -fno-pic libasan.a only anyway, any time you want to instrument a shared library, if you linked non-pic libasan.a into it, it wouldn't link on many architectures and on others would fail SELinux restrictions. If IE TLS mode is used, there is no problem if an app is linked against it or if libraries it depends on are linked against it, there could be a problem if its TLS usage is too large and app isn't linked against the library, and you only dlopen some -fsanitize=address compiled/linked shared library. Then dlopen could fail (unless you e.g. LD_PRELOAD=libasan.so.0 or otherwise make sure the app is linked against it). Other GCC shared libraries (e.g. libgomp.so.1) are also using the IE model.