diff options
author | Sean Silva <silvas@purdue.edu> | 2013-06-22 01:06:12 +0000 |
---|---|---|
committer | Sean Silva <silvas@purdue.edu> | 2013-06-22 01:06:12 +0000 |
commit | 58495694c09540459e4eea50eef2dcffc705f3c3 (patch) | |
tree | 26e65d1056d5cf8b8053f68028abba98fac92a80 /tools | |
parent | efc78986b3bf51572e013bfdf8cbb9e06a47c788 (diff) | |
download | external_llvm-58495694c09540459e4eea50eef2dcffc705f3c3.zip external_llvm-58495694c09540459e4eea50eef2dcffc705f3c3.tar.gz external_llvm-58495694c09540459e4eea50eef2dcffc705f3c3.tar.bz2 |
[yaml2obj][ELF] Don't special case writing these.
Just add them to the vector of section headers like the rest of the
section headers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184624 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools')
-rw-r--r-- | tools/yaml2obj/yaml2elf.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/yaml2obj/yaml2elf.cpp b/tools/yaml2obj/yaml2elf.cpp index 3ac5033..5ca52a2 100644 --- a/tools/yaml2obj/yaml2elf.cpp +++ b/tools/yaml2obj/yaml2elf.cpp @@ -347,16 +347,16 @@ static int writeELF(raw_ostream &OS, const ELFYAML::Object &Doc) { zero(DotStrTabSHeader); DotStrTabSHeader.sh_name = SHStrTab.addString(StringRef(".strtab")); createStringTableSectionHeader(DotStrTabSHeader, State.getStringTable(), CBA); + SHeaders.push_back(DotStrTabSHeader); // Section header string table header. Elf_Shdr SHStrTabSHeader; zero(SHStrTabSHeader); createStringTableSectionHeader(SHStrTabSHeader, SHStrTab, CBA); + SHeaders.push_back(SHStrTabSHeader); OS.write((const char *)&Header, sizeof(Header)); writeVectorData(OS, SHeaders); - OS.write((const char *)&DotStrTabSHeader, sizeof(DotStrTabSHeader)); - OS.write((const char *)&SHStrTabSHeader, sizeof(SHStrTabSHeader)); CBA.writeBlobToStream(OS); return 0; } |