Skip to content

Commit 7dd41fa

Browse files
authored
1 parent 6114d47 commit 7dd41fa

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lld/COFF/Writer.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2130,6 +2130,10 @@ void Writer::createRuntimePseudoRelocs() {
21302130
auto *sc = dyn_cast<SectionChunk>(c);
21312131
if (!sc || !sc->live)
21322132
continue;
2133+
// Don't create pseudo relocations for sections that won't be
2134+
// mapped at runtime.
2135+
if (sc->header->Characteristics & IMAGE_SCN_MEM_DISCARDABLE)
2136+
continue;
21332137
sc->getRuntimePseudoRelocs(rels);
21342138
}
21352139

0 commit comments

Comments
 (0)