lld silently creates an non-working executable if both .ctors and .init_array exist · Issue #68071 · llvm/llvm-project (original) (raw)

If input object files contain both .ctors and .init_array, the result would contain both .ctors and .init_array, and the result is very likely to crash because some initializer are not executed. We may want to emit a warning from lld if the output may not work due to this issue.