https://sourceware.org/bugzilla/show_bug.cgi?id=29973
--- Comment #35 from cqwrteur <euloanty at live dot com> --- (In reply to Nick Clifton from comment #32) > Hi, > > I am wondering if there are two problems here, rather than just one. So > please could you check a couple of things for me ? > > 1. Does iostream.exe fail to run if built without LTO ? > 2. Where does iostream.exe fail ? Is it before main(), or when the > libstdc++ library is being loaded, or somewhere else ? > > Thanks > Nick I have tried. Looks like this issue only happens when iostream is included since iostream has a static global variable that causes issues. https://github.com/gcc-mirror/gcc/blob/07f497c2da3600cc99cd7d1b5c6726972fb2b5a1/libstdc%2B%2B-v3/include/std/iostream#L78 https://github.com/gcc-mirror/gcc/blob/ec59848074ba8c4310cbadb603822bfaeff03a32/libstdc%2B%2B-v3/src/c%2B%2B98/ios_base_init.h #if __has_attribute(init_priority) static ios_base::Init __ioinit __attribute__((init_priority(90))); #endif It has this new init_priority attribute. Perhaps ld fails to understand PE targets while lld does? -- You are receiving this mail because: You are on the CC list for the bug.