Skip to content

Commit b26f45e

Browse files
committed
[ORC] Skip non-SHF_ALLOC sections in DebugObjectManagerPlugin.
We don't need to provide a load-address for non-alloc sections. Skipping them allows us to avoid some complications, like handling duplicate .group sections.
1 parent d0a6de5 commit b26f45e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

llvm/lib/ExecutionEngine/Orc/DebugObjectManagerPlugin.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,9 @@ ELFDebugObject::CreateArchType(MemoryBufferRef Buffer,
289289
continue;
290290
HasDwarfSection |= isDwarfSection(*Name);
291291

292+
if (!(Header.sh_flags & ELF::SHF_ALLOC))
293+
continue;
294+
292295
auto Wrapped = std::make_unique<ELFDebugObjectSection<ELFT>>(&Header);
293296
if (Error Err = DebugObj->recordSection(*Name, std::move(Wrapped)))
294297
return std::move(Err);

0 commit comments

Comments
 (0)