On Wed, Jul 30, 2014 at 12:30 PM, ji wang <[email protected]> wrote: >>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?
I think this lives in gcc/config/gnu-user.h. You could also link libs manually by passing options directly to linker via -Wl but I guess this is unsupported by Asan team. > 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. Ah, ok. This _might_ work but as Evgeny said you are on no man's land here: GCC Asan does not really support Android as of now. Patches to fix this are welcome though. -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.
