summaryrefslogtreecommitdiff
path: root/tools/yaml2obj
diff options
context:
space:
mode:
Diffstat (limited to 'tools/yaml2obj')
-rw-r--r--tools/yaml2obj/yaml2elf.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/yaml2obj/yaml2elf.cpp b/tools/yaml2obj/yaml2elf.cpp
index 3ac50334a2..5ca52a2d70 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;
}