forked from OSchip/llvm-project
Don't emit a shstrtabindex in the reserved range. Spotted by inspection and
patch by Cary Coutant! llvm-svn: 141413
This commit is contained in:
parent
4eb1143038
commit
8b02d36a23
|
@ -130,7 +130,7 @@ void ELFObjectWriter::WriteHeader(uint64_t SectionDataSize,
|
|||
Write16(NumberOfSections);
|
||||
|
||||
// e_shstrndx = Section # of '.shstrtab'
|
||||
if (NumberOfSections >= ELF::SHN_LORESERVE)
|
||||
if (ShstrtabIndex >= ELF::SHN_LORESERVE)
|
||||
Write16(ELF::SHN_XINDEX);
|
||||
else
|
||||
Write16(ShstrtabIndex);
|
||||
|
|
Loading…
Reference in New Issue