>FYI I'm getting the same link sequence if I link hello-world with GCC >4.10 x86 and ARM Linux toolchains (and they both match your results >for x86). Yuri, Do you know where your GCC4.10 organize this link order? Or how to insert the *-lasan* and *libasan_preinit.o* to the linker?
>As for Android, link options look rather unexpected (and probably >incorrect). Is GCC called directly (with -fsanitize=address) or via >ndk-build magic? Yes, GCC called directly not using ndk-build. And I've found the reason why *-lc -lstdc++ -lm* is ahead of my *-fsanitize=address -lasan* now. Because in Android build system, defined a default order of loading some libs, PRIVATE_ALL_SHARED_LIBRARIES macro is the libc.so libstdc++.so loader, and it been placed ahead of my LDFLAGS. I changed this order, went ok. Hope no side effects. 在 2014年7月30日星期三UTC+8下午3时58分41秒,Yuri Gribov写道: > > On Wed, Jul 30, 2014 at 5:49 AM, ji wang <[email protected] > <javascript:>> wrote: > > And Here is an output of GCC on X86 to compare with > > FYI I'm getting the same link sequence if I link hello-world with GCC > 4.10 x86 and ARM Linux toolchains (and they both match your results > for x86). > > As for Android, link options look rather unexpected (and probably > incorrect). Is GCC called directly (with -fsanitize=address) or via > ndk-build magic? > > -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.
