Bug 19326 - Swift linker script unparsable
Summary: Swift linker script unparsable
Status: RESOLVED DUPLICATE of bug 15373
Alias: None
Product: binutils
Classification: Unclassified
Component: gold (show other bugs)
Version: 2.27
: P2 normal
Target Milestone: ---
Assignee: Cary Coutant
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-12-04 07:47 UTC by Markus Trippelsdorf
Modified: 2015-12-04 17:59 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Markus Trippelsdorf 2015-12-04 07:47:57 UTC
The Swift language uses a linker script when building binaries.
Unfortunately gold cannot parse it. ld.bfd is fine:

markus@x4 x86_64 % cat swift.ld
SECTIONS
{
  .swift2_protocol_conformances :
  {
    .swift2_protocol_conformances_start = . ;
    QUAD(SIZEOF(.swift2_protocol_conformances) - 8) ;
    *(.swift2_protocol_conformances) ;
  }
}
INSERT AFTER .dtors

markus@x4 x86_64 % ld.bfd -T swift.ld
ld.bfd: no input files

markus@x4 x86_64 % ld.gold -T swift.ld
ld.gold: error: swift.ld:10:8: syntax error, unexpected STRING
ld.gold: fatal error: unable to parse script file swift.ld
Comment 1 Markus Trippelsdorf 2015-12-04 15:46:21 UTC
Looks like a dup of PR15373.
Comment 2 Cary Coutant 2015-12-04 17:59:12 UTC
Resolving as duplicate.

*** This bug has been marked as a duplicate of bug 15373 ***