forked from OSchip/llvm-project
parent
9aa82f76ac
commit
0e8521c05a
|
|
@ -508,14 +508,17 @@ void Writer::createSymbolAndStringTable() {
|
||||||
Sec->setStringTableOff(addEntryToStringTable(Name));
|
Sec->setStringTableOff(addEntryToStringTable(Name));
|
||||||
}
|
}
|
||||||
|
|
||||||
for (lld::coff::ObjectFile *File : Symtab->ObjectFiles)
|
for (lld::coff::ObjectFile *File : Symtab->ObjectFiles) {
|
||||||
for (SymbolBody *B : File->getSymbols())
|
for (SymbolBody *B : File->getSymbols()) {
|
||||||
if (auto *D = dyn_cast<Defined>(B))
|
auto *D = dyn_cast<Defined>(B);
|
||||||
if (!D->WrittenToSymtab) {
|
if (!D || D->WrittenToSymtab)
|
||||||
D->WrittenToSymtab = true;
|
continue;
|
||||||
if (Optional<coff_symbol16> Sym = createSymbol(D))
|
D->WrittenToSymtab = true;
|
||||||
OutputSymtab.push_back(*Sym);
|
|
||||||
}
|
if (Optional<coff_symbol16> Sym = createSymbol(D))
|
||||||
|
OutputSymtab.push_back(*Sym);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
OutputSection *LastSection = OutputSections.back();
|
OutputSection *LastSection = OutputSections.back();
|
||||||
// We position the symbol table to be adjacent to the end of the last section.
|
// We position the symbol table to be adjacent to the end of the last section.
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue