summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNick Lewycky <nicholas@mxc.ca>2011-10-07 20:58:24 +0000
committerNick Lewycky <nicholas@mxc.ca>2011-10-07 20:58:24 +0000
commit8b02d36a230ef17fe090bb6cbd335dce6e6fed4b (patch)
tree88d2eb16f9d203669c9429b4661683f20b1907ad
parent4eb114303863d78ddf3eb0f09a9b3f900554379a (diff)
downloadbcm5719-llvm-8b02d36a230ef17fe090bb6cbd335dce6e6fed4b.tar.gz
bcm5719-llvm-8b02d36a230ef17fe090bb6cbd335dce6e6fed4b.zip
Don't emit a shstrtabindex in the reserved range. Spotted by inspection and
patch by Cary Coutant! llvm-svn: 141413
-rw-r--r--llvm/lib/MC/ELFObjectWriter.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/MC/ELFObjectWriter.cpp b/llvm/lib/MC/ELFObjectWriter.cpp
index 549a5099376..9bb64625654 100644
--- a/llvm/lib/MC/ELFObjectWriter.cpp
+++ b/llvm/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);
OpenPOWER on IntegriCloud