On Thu, Feb 21, 2013 at 02:21:36PM +0100, Jakub Jelinek wrote: > Here is a different fix, so libasan.so will not have .preinit_array, but > libasan.a will have it. Ideally, that hunk should go into a separate > source file (asan_preinit.cc ?), be just compiled into an object file, > rather than shared library and the compiler driver should include it > explicitly in the link.
BTW, if you move it into asan_preinit.cc (or whatever other name) separate file, as the Makefiles aren't shared, it is fine if for clang you choose to put it into clang libasan.a, and gcc can do something different. Jakub