https://issues.dlang.org/show_bug.cgi?id=20220
Dlang Bot <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #9 from Dlang Bot <[email protected]> --- dlang/dmd pull request #10562 "Fix Issue 20220 - Use .init_array/.fini_array instead of .ctors/.dtors on !TARGET_OPENBSD" was merged into master: - 082a9f459c863120929b86f1559a5e75fd2da60a by Fangrui Song: Fix Issue 20220 - Use .init_array/.fini_array instead of .ctors/.dtors on !TARGET_OPENBSD Global constructors are placed in .ctors sections. lld does not convert .ctors to .init_array (https://bugs.llvm.org/show_bug.cgi?id=31224). The linked executable will not run constructors on most modern Linux distributions. GNU ld and gold convert .ctors/.dtors to .init_array/.fini_array by default, so programs linked by them are fine. Fix this by using .init_array/.fini_array . Linux, DragonFlyBSD, FreeBSD and Solaris have supported .init_array for many years. The OpenBSD support is relatively new (Aug 2016), so only use .ctors/.dtors on OpenBSD. https://github.com/dlang/dmd/pull/10562 --
