mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-15 07:39:31 +00:00
[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
This commit is contained in:
parent
1a38fd79ca
commit
6c026a5822
@ -347,16 +347,16 @@ static int writeELF(raw_ostream &OS, const ELFYAML::Object &Doc) {
|
|||||||
zero(DotStrTabSHeader);
|
zero(DotStrTabSHeader);
|
||||||
DotStrTabSHeader.sh_name = SHStrTab.addString(StringRef(".strtab"));
|
DotStrTabSHeader.sh_name = SHStrTab.addString(StringRef(".strtab"));
|
||||||
createStringTableSectionHeader(DotStrTabSHeader, State.getStringTable(), CBA);
|
createStringTableSectionHeader(DotStrTabSHeader, State.getStringTable(), CBA);
|
||||||
|
SHeaders.push_back(DotStrTabSHeader);
|
||||||
|
|
||||||
// Section header string table header.
|
// Section header string table header.
|
||||||
Elf_Shdr SHStrTabSHeader;
|
Elf_Shdr SHStrTabSHeader;
|
||||||
zero(SHStrTabSHeader);
|
zero(SHStrTabSHeader);
|
||||||
createStringTableSectionHeader(SHStrTabSHeader, SHStrTab, CBA);
|
createStringTableSectionHeader(SHStrTabSHeader, SHStrTab, CBA);
|
||||||
|
SHeaders.push_back(SHStrTabSHeader);
|
||||||
|
|
||||||
OS.write((const char *)&Header, sizeof(Header));
|
OS.write((const char *)&Header, sizeof(Header));
|
||||||
writeVectorData(OS, SHeaders);
|
writeVectorData(OS, SHeaders);
|
||||||
OS.write((const char *)&DotStrTabSHeader, sizeof(DotStrTabSHeader));
|
|
||||||
OS.write((const char *)&SHStrTabSHeader, sizeof(SHStrTabSHeader));
|
|
||||||
CBA.writeBlobToStream(OS);
|
CBA.writeBlobToStream(OS);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user