Skip to content

Commit

Permalink
[Orc][Coff] Skip registration of voltbl sections
Browse files Browse the repository at this point in the history
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
  • Loading branch information
River707 committed Jun 14, 2023
1 parent a5aeba7 commit 639e411
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
7 changes: 7 additions & 0 deletions llvm/lib/ExecutionEngine/JITLink/COFFLinkGraphBuilder.cpp
Expand Up @@ -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() << " "
Expand Down
4 changes: 4 additions & 0 deletions llvm/lib/ExecutionEngine/JITLink/COFFLinkGraphBuilder.h
Expand Up @@ -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.
Expand Down

0 comments on commit 639e411

Please sign in to comment.