Also create a shndx even if there are no symbols. This lets us test

.symtab_shndx reading and writing together, and finally we have a testcase for
r141440.

llvm-svn: 141641
This commit is contained in:
Nick Lewycky 2011-10-11 03:54:50 +00:00
parent ba38717f34
commit 29e7b315ac
2 changed files with 93323 additions and 0 deletions

View File

@ -666,6 +666,9 @@ void ELFObjectWriter::ComputeSymbolTable(MCAssembler &Asm,
ExternalSymbolData[i].SymbolData->setIndex(Index++);
for (unsigned i = 0, e = UndefinedSymbolData.size(); i != e; ++i)
UndefinedSymbolData[i].SymbolData->setIndex(Index++);
if (NumRegularSections > ELF::SHN_LORESERVE)
NeedsSymtabShndx = true;
}
void ELFObjectWriter::CreateRelocationSections(MCAssembler &Asm,

File diff suppressed because it is too large Load Diff