https://issues.dlang.org/show_bug.cgi?id=20220
Dlang Bot <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |pull --- Comment #7 from Dlang Bot <[email protected]> --- @MaskRay created dlang/dmd pull request #10562 "Use .init_array/.fini_array instead of .ctors/.dtors" fixing this issue: - Use .init_array/.fini_array instead of .ctors/.dtors Fix Issue 20220. dmd places global constructors in .ctors sections. When such sections are linked by lld, the executable will not run constructors on most modern Linux distributions (musl does not support .ctors/glibc is usually configured with NO_CTORS_DTORS_SECTIONS). GNU ld and gold convert .ctors/.dtors to .init_array/.fini_array by default, so programs linked by them are fine. lld does not support the feature and it probably makes little sense to add the support (https://bugs.llvm.org/show_bug.cgi?id=31224): .init_array has been supported by glibc for 20 years and adopted by most ELF platforms. https://github.com/dlang/dmd/pull/10562 --
