From 7d617222593f3e2023de781e3e67d05f3620b86c Mon Sep 17 00:00:00 2001 From: Sean Silva Date: Sat, 22 Jun 2013 01:06:12 +0000 Subject: [yaml2obj][ELF] Don't special case writing these. Just add them to the vector of section headers like the rest of the section headers. llvm-svn: 184624 --- llvm/tools/yaml2obj/yaml2elf.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/llvm/tools/yaml2obj/yaml2elf.cpp b/llvm/tools/yaml2obj/yaml2elf.cpp index 3ac50334a22..5ca52a2d700 100644 --- a/llvm/tools/yaml2obj/yaml2elf.cpp +++ b/llvm/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; } -- cgit v1.2.3