#define DECLARE_SWIFT_SECTION(name) \ __asm__("\t.section " #name ",\"a\"\n"); \ __attribute__((__visibility__("hidden"),__aligned__(1))) extern const char __start_##name; \ __attribute__((__visibility__("hidden"),__aligned__(1))) extern const char __stop_##name; extern "C" { DECLARE_SWIFT_SECTION(swift5_protocols)
__start_section
と __stop_section
のシンボルをリンクさせて・・・ (edited)#define SWIFT_SECTION_RANGE(name) \ { reinterpret_cast<uintptr_t>(&__start_##name), \ static_cast<uintptr_t>(&__stop_##name - &__start_##name) } ... SWIFT_SECTION_RANGE(swift5_protocols),