Skip to content

[SR-1] Linux: remove Swift dependence on the swift.ld linker script #42627

Closed
@jopamer

Description

@jopamer
Previous ID SR-1
Radar rdar://problem/22724955
Original Reporter @jopamer
Type Bug
Status Closed
Resolution Done
Additional Detail from JIRA
Votes 2
Component/s
Labels Bug, Linux
Assignee None
Priority Medium

md5: 90c6fa571fac13d05c95850bed417233

Issue Description:

Building Swift on Linux currently depends on a linker script to mark protocol conformances. This linker script method is not compatible with the gold linker. We want to support using the gold linker, so come up with another method to achieve this that is compatible with the gold linker.

It seems likely there are at least the following options that seem potentially valid:

  1. We could do some work inside the swift compiler itself as a pre-link step, to collate the protocol conformance data into a single object file. I think we’re ultimately looking for a section of data that we know the size and length of, that contains the conformance data, that can be accessed as a known symbol name at runtime.

  2. Adjust the gold linker to support the symbol collation functionality in ld.bfd that is not in ld.gold. The gold linker is a GPLv3 project.

Metadata

Metadata

Assignees

No one assigned

    Labels

    LinuxPlatform: LinuxbugA deviation from expected or documented behavior. Also: expected but undesirable behavior.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions