diff options
author | Nick Lewycky <nicholas@mxc.ca> | 2011-10-07 20:58:24 +0000 |
---|---|---|
committer | Nick Lewycky <nicholas@mxc.ca> | 2011-10-07 20:58:24 +0000 |
commit | b3429d34b641d2b5aaa3e7df70d268904d2c039c (patch) | |
tree | 29133316f149ebbc76261818bb89ff9238ccd07b /lib | |
parent | aaae3f6bc1b7ab3475d7399915a887b42f6365bc (diff) |
Don't emit a shstrtabindex in the reserved range. Spotted by inspection and
patch by Cary Coutant!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141413 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/MC/ELFObjectWriter.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/MC/ELFObjectWriter.cpp b/lib/MC/ELFObjectWriter.cpp index 549a509937..9bb6462565 100644 --- a/lib/MC/ELFObjectWriter.cpp +++ b/lib/MC/ELFObjectWriter.cpp @@ -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); |