>Right, both GCC and Clang will arrange proper lib order during link. 
But look at my post above, I use GCC Asan on Android to compile a third 
party executable,
the -fsanitize=address was passed to the ld, but libc still ahead of 
libasan.so.1, seems the Gcc
did not arrange proper lib during link. why is that?

> arm-linux-androideabi-readelf -d asan_use_after_free | grep NEEDED 
>  0x00000001 (NEEDED)                     Shared library: [libc.so] 
>  0x00000001 (NEEDED)                     Shared library: [libstdc++.so] 
>  0x00000001 (NEEDED)                     Shared library: [libm.so] 
>  0x00000001 (NEEDED)                     Shared library: [libasan.so.1] 
>  0x00000001 (NEEDED)                     Shared library: [libdl.so] 

在 2014年7月29日星期二UTC+8下午2时45分22秒,Yuri Gribov写道:
>
> On Tue, Jul 29, 2014 at 10:34 AM, ji wang <[email protected] 
> <javascript:>> wrote: 
> >>Do you mean Android? ARM Linux should be 100% similar to x86 Linux. 
> > Yes, I mean Android. I am using Asan enabled GCC android toolchain now. 
>
> From Evgeny's words it seems that GCC Asan and LLVM Asan work 
> differently on Android. And GCC Asan is not quite usable on Android 
> (it seems to work by accident). 
>
> >>GCC arranges library order for you when you link with 
> >>-fsanitize=address. 
> > Does this mean when I use Asan enabled GCC android toolchain, pass 
> > -fsanitize=address 
> > to the LD_FLAGS,  the GCC can arranges lib order for me? 
>
> Right, both GCC and Clang will arrange proper lib order during link. 
>
> -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