diff options
author | Zachary Turner <zturner@google.com> | 2017-12-06 18:58:48 +0000 |
---|---|---|
committer | Zachary Turner <zturner@google.com> | 2017-12-06 18:58:48 +0000 |
commit | 8b348680b2bd89c8e06f3e53c7ae8d90d835e6f2 (patch) | |
tree | e607362e13fb6964269eab43ba269e91ab3c680c /tools | |
parent | ee79c38757ad8ad12cdb5e7661dcdb78913599fc (diff) |
Update obj2yaml and yaml2obj for .debug$H section.
Differential Revision: https://reviews.llvm.org/D40842
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319925 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools')
-rw-r--r-- | tools/obj2yaml/coff2yaml.cpp | 2 | ||||
-rw-r--r-- | tools/yaml2obj/yaml2coff.cpp | 3 |
2 files changed, 5 insertions, 0 deletions
diff --git a/tools/obj2yaml/coff2yaml.cpp b/tools/obj2yaml/coff2yaml.cpp index b1a06bca1a7..acd81c9241f 100644 --- a/tools/obj2yaml/coff2yaml.cpp +++ b/tools/obj2yaml/coff2yaml.cpp @@ -172,6 +172,8 @@ void COFFDumper::dumpSections(unsigned NumSections) { NewYAMLSection.DebugS = CodeViewYAML::fromDebugS(sectionData, SC); else if (NewYAMLSection.Name == ".debug$T") NewYAMLSection.DebugT = CodeViewYAML::fromDebugT(sectionData); + else if (NewYAMLSection.Name == ".debug$H") + NewYAMLSection.DebugH = CodeViewYAML::fromDebugH(sectionData); std::vector<COFFYAML::Relocation> Relocations; for (const auto &Reloc : ObjSection.relocations()) { diff --git a/tools/yaml2obj/yaml2coff.cpp b/tools/yaml2obj/yaml2coff.cpp index 1f302fdc45a..648317e97bb 100644 --- a/tools/yaml2obj/yaml2coff.cpp +++ b/tools/yaml2obj/yaml2coff.cpp @@ -234,6 +234,9 @@ static bool layoutCOFF(COFFParser &CP) { } else if (S.Name == ".debug$T") { if (S.SectionData.binary_size() == 0) S.SectionData = CodeViewYAML::toDebugT(S.DebugT, CP.Allocator); + } else if (S.Name == ".debug$H") { + if (S.DebugH.hasValue() && S.SectionData.binary_size() == 0) + S.SectionData = CodeViewYAML::toDebugH(*S.DebugH, CP.Allocator); } if (S.SectionData.binary_size() > 0) { |