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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141641 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Nick Lewycky 2011-10-11 03:54:50 +00:00
parent b1044b042f
commit 7aabcb1fc0
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,

93320
test/MC/ELF/many-section.s Normal file

File diff suppressed because it is too large Load Diff