http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55617



--- Comment #20 from Alexander Potapenko <glider at google dot com> 2013-01-30 
17:07:25 UTC ---

(In reply to comment #19)

> Well, if somebody does the work and in a clean way that won't penalize targets

> with sane linkers and object formats, I'm not objecting, I just am not going 
> to

> spend time on this.  If clang can handle ctor priorities right at least inside

> of each individual CUs, perhaps those that care about targets which don't

> support that in the linker can add similar support to gcc (what I've been

> suggesting, if priorities aren't supported by linker, don't emit stuff right

> away, but just queue it and at the end sort it and emit.



Looks like you're right and the constructors are just being emitted by

machopic_asm_out_constructor() in gcc/config/darwin.c, so ASan just has no

chance to add his ctor before the default one.



I suppose this can be fixed in gcc/config/darwin.c, but we don't have enough

knowledge and/or cycles for this. Perhaps the right thing to do is to file a

bug against the owner of that file.

Reply via email to