Recent master versions of dmd trigger an ld.gold assertion. /usr/bin/ld: internal error in add_output_section_to_load, at output.cc:4093 Seems like it complains about input section having a different order than the mapping in the linker script. https://sourceware.org/git/?p=binutils.git;a=blob;f=gold/output.cc;hb=a0a1bb07cb2c03b7d34f12e734c6f363ddb7c7b2#l4135 Apparently caused by this PR. https://github.com/D-Programming-Language/dmd/pull/5264 In my linker script .eh_frame follows .rodata but precedes .tdata.
The sections are not supposed to be order dependent.
(In reply to Walter Bright from comment #1) > The sections are not supposed to be order dependent. Yeah, you're right, the problem is that ld.gold doesn't assign an output order to the eh section. https://sourceware.org/git/?p=binutils.git;a=blob;f=gold/layout.cc;hb=a0a1bb07cb2c03b7d34f12e734c6f363ddb7c7b2#l1386
I can no longer reproduce this, maybe I had some corrupted object file lying around. The linker wasn't updated since filing this bug report.