[PATCH] Optional support for dynamic Asan runtime

Alexey Samsonov samsonov at google.com
Tue Apr 1 08:19:12 PDT 2014


On Tue, Apr 1, 2014 at 7:04 PM, Yuri Gribov <tetra2005 at gmail.com> wrote:

> > No, it's ON. Also,
>
> Hm, interesting. My understanding was that if library (libasan)
> depends on another library (libpthread) the latter would be loaded by
> ld.so as well (i.e. it's not necessary to link executable against it).
> Could you run ldd on executable? Does it list libpthread as well?
>
> And BTW I have no such problems on my local system.
>

Ah, indeed
$ ldd
projects/compiler-rt/test/asan/64bitConfig-dynamic/TestCases/Output/sanity_check_pure_c.c.tmp
linux-vdso.so.1 =>  (0x00007fff673ff000)
libclang_rt.asan-x86_64.so => not found
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f5dc4c75000)
/lib64/ld-linux-x86-64.so.2 (0x00007f5dc5057000)

notice the "not found" part. When we link the executable with
libclang_rt.asan-x86_64.so, linker doesn't know where this .so would come
from (we need to specify LD_LIBRARY_PATH for it), and therefore doesn't
link in the transitive dependencies.

-- 
Alexey Samsonov, MSK
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140401/7241751b/attachment.html>


More information about the llvm-commits mailing list