commit | 8fdf39ac8b7df58b47eaa54f02da043c120a7fa7 | [log] [tgz] |
---|---|---|
author | George Rimar <grimar@accesssoftek.com> | Sat Feb 09 15:03:19 2019 +0000 |
committer | George Rimar <grimar@accesssoftek.com> | Sat Feb 09 15:03:19 2019 +0000 |
tree | ed995f1d1065139ab217378fe68137061314b9c9 | |
parent | b58596f8637be9e1e266a39e3e905ec234d45c9a [diff] |
[yaml2elf] - An attemp to fix s390x BB after r353607. s390x is big-endian and seems r353607 had an issue with endianess, Bot was unhappy: http://lab.llvm.org:8011/builders/clang-s390x-linux-lnt/builds/11168/steps/ninja%20check%201/logs/stdio This should fix it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353613 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/tools/yaml2obj/yaml2elf.cpp b/tools/yaml2obj/yaml2elf.cpp index 4e3a1d7..50644a9 100644 --- a/tools/yaml2obj/yaml2elf.cpp +++ b/tools/yaml2obj/yaml2elf.cpp
@@ -594,10 +594,10 @@ auto &OS = CBA.getOSAndAlignedOffset(SHeader.sh_offset, SHeader.sh_addralign); for (const ELFYAML::DynamicEntry &DE : Section.Entries) { - uintX_t Tag = DE.Tag; - OS.write((const char *)&Tag, sizeof(uintX_t)); - uintX_t Val = DE.Val; - OS.write((const char *)&Val, sizeof(uintX_t)); + ELFT::Xword Tag = (ELFT::Xword)DE.Tag; + OS.write((const char *)&Tag, sizeof(ELFT::Xword)); + ELFT::Xword Val = (ELFT::Xword)DE.Val; + OS.write((const char *)&Val, sizeof(ELFT::Xword)); } }