This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug sanitizer/55374] [asan] -static-libasan -static-libstdc++ doesn't work
- From: "kcc at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 29 Jan 2013 09:18:49 +0000
- Subject: [Bug sanitizer/55374] [asan] -static-libasan -static-libstdc++ doesn't work
- Auto-submitted: auto-generated
- References: <bug-55374-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55374
--- Comment #19 from Kostya Serebryany <kcc at gcc dot gnu.org> 2013-01-29 09:18:49 UTC ---
>
> As with the patch for this PR -lasan is linked before -lstdc++, the wrapper
> should kick in. But the patch is still unreviewed.
How?
If we are linking both libraries statically, only one version of
__cxa_throw will exist in the binary.
The current code works like this (assuming dynamic linkage of stdc++):
__cxa_throw in asan-rt calls __cxa_throw from libc++ (found using dlsym)
The same is true for various libc interceptors in asan,
that's why asan does not support fully static linkage.