← Back to index
|
Original Bugzilla link
Bug 15392 – dmd object files fail to link with ld.gold
Status
RESOLVED
Resolution
WORKSFORME
Severity
regression
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2015-12-01T02:23:00Z
Last change time
2016-01-04T20:52:53Z
Assigned to
nobody
Creator
code
Comments
Comment #0
by code — 2015-12-01T02:23:38Z
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.
Comment #1
by bugzilla — 2015-12-01T03:46:00Z
The sections are not supposed to be order dependent.
Comment #2
by code — 2015-12-01T08:47:31Z
(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
Comment #3
by code — 2016-01-04T20:52:53Z
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.