>No, LD_PRELOAD setting is "global" i.e. it affects executable and all 
>loaded libraries. 

I don't use LD_PRELOAD here, because the Gcc has done it for me already.  
when I recompiled one lib and got its NEEDED libs like blow:
grep NEEDED 
>  0x00000001 (NEEDED)                     Shared library: [libasan.so.1] 
>  0x00000001 (NEEDED)                     Shared library: [libc.so] 
>  0x00000001 (NEEDED)                     Shared library: [libstdc++.so] 
>  0x00000001 (NEEDED)                     Shared library: [libm.so] 
>  0x00000001 (NEEDED)                     Shared library: [libdl.so] 
libasan.so.1 is ahead of libc.so, And I think the other libs couldn't link 
the libasan.so.1 except this recompiled one, so the interceptors not work 
for them. Am I right?

在 2014年8月7日星期四UTC+8下午7时40分49秒,Yuri Gribov写道:
>
> > I think those interceptors means that we define the same name functions 
> as 
> > libc, like memset, and preload it before libc, so the instrumented code 
> call 
> > the asan memset not the libc memset. 
>
> Right. 
>
> > So the preload decides whether call asan memset or not, and Gcc Asan 
> only 
> > preload the libasan.so for the instrumented lib not using LD_PRELOAD for 
> the 
> > entire process, so a little confused, am I wrong? 
>
> No, LD_PRELOAD setting is "global" i.e. it affects executable and all 
> loaded libraries. 
>
> -Y 
>

-- 
You received this message because you are subscribed to the Google Groups 
"address-sanitizer" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to