[llvm] b26f45e - [ORC] Skip non-SHF_ALLOC sections in DebugObjectManagerPlugin.
Lang Hames via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 25 18:40:44 PDT 2022
Author: Lang Hames
Date: 2022-10-25T18:40:38-07:00
New Revision: b26f45e5a49ae363164e7dbbf57eadd9e78d612c
URL: https://github.com/llvm/llvm-project/commit/b26f45e5a49ae363164e7dbbf57eadd9e78d612c
DIFF: https://github.com/llvm/llvm-project/commit/b26f45e5a49ae363164e7dbbf57eadd9e78d612c.diff
LOG: [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.
Added:
Modified:
llvm/lib/ExecutionEngine/Orc/DebugObjectManagerPlugin.cpp
Removed:
################################################################################
diff --git a/llvm/lib/ExecutionEngine/Orc/DebugObjectManagerPlugin.cpp b/llvm/lib/ExecutionEngine/Orc/DebugObjectManagerPlugin.cpp
index 690f6b24e78a4..418dc39bf3cfe 100644
--- a/llvm/lib/ExecutionEngine/Orc/DebugObjectManagerPlugin.cpp
+++ b/llvm/lib/ExecutionEngine/Orc/DebugObjectManagerPlugin.cpp
@@ -289,6 +289,9 @@ ELFDebugObject::CreateArchType(MemoryBufferRef Buffer,
continue;
HasDwarfSection |= isDwarfSection(*Name);
+ if (!(Header.sh_flags & ELF::SHF_ALLOC))
+ continue;
+
auto Wrapped = std::make_unique<ELFDebugObjectSection<ELFT>>(&Header);
if (Error Err = DebugObj->recordSection(*Name, std::move(Wrapped)))
return std::move(Err);
More information about the llvm-commits
mailing list