Skip to content

Commit d438c88

Browse files
authored
Merge pull request #82970 from etcwilde/ewilde/6.2-skip-unused-sections
[6.2🍒]: RemoteInspection: Skip unused ELF section headers
2 parents 9ac4ebc + ad1a336 commit d438c88

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

include/swift/RemoteInspection/ReflectionContext.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -635,6 +635,9 @@ class ReflectionContext
635635
return {nullptr, 0};
636636
// Now for all the sections, find their name.
637637
for (const typename T::Section *Hdr : SecHdrVec) {
638+
// Skip unused headers
639+
if (Hdr->sh_type == llvm::ELF::SHT_NULL)
640+
continue;
638641
uint32_t Offset = Hdr->sh_name;
639642
const char *Start = (const char *)StrTab + Offset;
640643
uint64_t StringSize = strnlen(Start, StrTabSize - Offset);

0 commit comments

Comments
 (0)