[llvm] 639e411 - [Orc][Coff] Skip registration of voltbl sections
River Riddle via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 13 23:09:45 PDT 2023
Author: River Riddle
Date: 2023-06-13T23:08:48-07:00
New Revision: 639e411c02036523564e897cd2e27fe0d6a59112
URL: https://github.com/llvm/llvm-project/commit/639e411c02036523564e897cd2e27fe0d6a59112
DIFF: https://github.com/llvm/llvm-project/commit/639e411c02036523564e897cd2e27fe0d6a59112.diff
LOG: [Orc][Coff] Skip registration of voltbl sections
We're getting asserts for duplicate section registration during
linking which stems back to these sections. From previous
discussions, it seems like these are metadata sections that can
be dropped. See the discussion in D116474 and
https://bugs.llvm.org/show_bug.cgi?id=45111.
Differential Revision: https://reviews.llvm.org/D152574
Added:
Modified:
llvm/lib/ExecutionEngine/JITLink/COFFLinkGraphBuilder.cpp
llvm/lib/ExecutionEngine/JITLink/COFFLinkGraphBuilder.h
Removed:
################################################################################
diff --git a/llvm/lib/ExecutionEngine/JITLink/COFFLinkGraphBuilder.cpp b/llvm/lib/ExecutionEngine/JITLink/COFFLinkGraphBuilder.cpp
index 5aee66094dca6..21ea5fc34f8dc 100644
--- a/llvm/lib/ExecutionEngine/JITLink/COFFLinkGraphBuilder.cpp
+++ b/llvm/lib/ExecutionEngine/JITLink/COFFLinkGraphBuilder.cpp
@@ -135,6 +135,13 @@ Error COFFLinkGraphBuilder::graphifySections() {
SectionName = *SecNameOrErr;
// FIXME: Skip debug info sections
+ if (SectionName == ".voltbl") {
+ LLVM_DEBUG({
+ dbgs() << " "
+ << "Skipping section \"" << SectionName << "\"\n";
+ });
+ continue;
+ }
LLVM_DEBUG({
dbgs() << " "
diff --git a/llvm/lib/ExecutionEngine/JITLink/COFFLinkGraphBuilder.h b/llvm/lib/ExecutionEngine/JITLink/COFFLinkGraphBuilder.h
index d7812a3963ac3..d5f2c7a7f6748 100644
--- a/llvm/lib/ExecutionEngine/JITLink/COFFLinkGraphBuilder.h
+++ b/llvm/lib/ExecutionEngine/JITLink/COFFLinkGraphBuilder.h
@@ -193,6 +193,10 @@ Error COFFLinkGraphBuilder::forEachRelocation(const object::SectionRef &RelSec,
Expected<StringRef> Name = Obj.getSectionName(COFFRelSect);
if (!Name)
return Name.takeError();
+
+ // Skip the unhandled metadata sections.
+ if (*Name == ".voltbl")
+ return Error::success();
LLVM_DEBUG(dbgs() << " " << *Name << ":\n");
// Lookup the link-graph node corresponding to the target section name.
More information about the llvm-commits
mailing list