Files
swift-mirror/stdlib/runtime/swift.ld
Graham Batty 17b1721f8f Implement ELF protocol conformance loading.
This works by loading the protocols from a specially named symbol,
which is generated by the linker through the help of a linker script
that merges all of the protocol conformance blocks into one section
with its size at the start of it and points a global symbol at
the section.

We do all this because unlike MachO, section information does not
survive to be loaded into memory with ELF binaries. Instead,
the mappings that survive are 'segments', which contain one or
more sections. Information about how these relate to their original
sections is difficult, if not impossible, to obtain at runtime.

Swift SVN r23518
2014-11-21 17:09:48 +00:00

11 lines
214 B
Plaintext

SECTIONS
{
.swift1_protocol_conformances :
{
.swift1_protocol_conformances_start = . ;
QUAD(SIZEOF(.swift1_protocol_conformances) - 8) ;
*(.swift1_protocol_conformances) ;
}
}
INSERT AFTER .dtors