https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113183

--- Comment #13 from Sebastian Unger <sebunger44 at gmail dot com> ---
No worries, the constructor attribute is much better. I was aware of that, but
at the time had already several examples using .preinit_array and couldn't be
bothered to look it up. I later added the sort by priority and added priorities
to  the *init_array symbols that needed them, but not this one. Interestingly,
that was not when LTO started crashing (or I might have made the connection).
LTO only started crashing once I added the static global object NonTrivial!
Weird.

In any case, I have changed to the constructor attribute and learned my lesson
and am all good.

I'll leave this issue open in case someone wants to fix the crash in LD (or
wherever it comes from) so people running into this in the future will get a
nicer error message.

Reply via email to