When compiled separately, the following succeeds with LDC but fails with DMD on linux: ```D extern(C) string getHello() { return "hello"; } ``` ```D extern(C) string getHello(); void main() { assert(getHello.ptr == "hello".ptr); } ``` The reasons is that DMD generates invalid string sections, which have SHF_MERGE | SHF_STRINGS but sh_entisze = 0 instead of char.sizeof. See: https://github.com/dlang/dmd/pull/15915
@dkorpel created dlang/dmd pull request #15922 "Fix 24286 - String literals not merged by linker because of wrong ELF output" fixing this issue: - Fix 24286 - String literals not merged by linker because of wrong ELF output https://github.com/dlang/dmd/pull/15922