Skip to content

Commit 5e6c8b1

Browse files
committed
Remove erroneous ELF note.
On ELF platforms we currently output an ELF note but with totally invalid contents. I tried experimenting to see whether it was possible to do it properly and tie the result into ReflectionContext, but it turns out to be a hard problem because of issues to do with cross-segment symbol references and relocations. The upshot is that I think for now it's best just to remove it. We might revisit this in future at some point; it would be good to be able to reliably find the Swift metadata just from the ELF Phdrs. rdar://101749382
1 parent 4e65e14 commit 5e6c8b1

File tree

1 file changed

+0
-11
lines changed

1 file changed

+0
-11
lines changed

stdlib/public/runtime/SwiftRT-ELF.cpp

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -83,14 +83,3 @@ static void swift_image_constructor() {
8383

8484
swift_addNewDSOImage(&sections);
8585
}
86-
87-
__asm__(".section \".note.swift_reflection_metadata\", \"aw\"");
88-
89-
static __attribute__((__used__))
90-
__attribute__((__section__(".note.swift_reflection_metadata")))
91-
__attribute__((__aligned__(1)))
92-
struct {
93-
const char MagicString[sizeof(SWIFT_REFLECTION_METADATA_ELF_NOTE_MAGIC_STRING)];
94-
const swift::MetadataSections *Sections;
95-
} __attribute__((__packed__))
96-
Note = {SWIFT_REFLECTION_METADATA_ELF_NOTE_MAGIC_STRING, &sections};

0 commit comments

Comments
 (0)