You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Usually MSVC places C++ initializers between __cxx_ctors_begin__ and __cxx_ctors_end__ symbols as expected, but with LTO enabled (/GL compiler option) includes these symbols in reverse order into a weird ?__cxx_c section without the initializers themselves:
Reproducible on MSVC 19.28+
The text was updated successfully, but these errors were encountered:
The problem turned out to be simpler ...
Symbol names aren't important: a bug occurs only if these symbols are marked as inline and LTO is enabled.
Without an inline specifier (symbols can be left in the header file since it is included in one TU) - everything is OK.
I suppose it is due to the fact that the phase of forming the section of dynamic initializers in .rodata occurs before the resolution of symbols with a weak linkage.
Recent MSVC compiler uses
instead of old initializers provided by KTL.
Usually MSVC places C++ initializers between
__cxx_ctors_begin__
and__cxx_ctors_end__
symbols as expected, but with LTO enabled (/GL
compiler option) includes these symbols in reverse order into a weird?__cxx_c
section without the initializers themselves:Reproducible on MSVC 19.28+
The text was updated successfully, but these errors were encountered: