[llvm] r353613 - [yaml2elf] - An attemp to fix s390x BB after r353607.
George Rimar via llvm-commits
llvm-commits at lists.llvm.org
Sat Feb 9 07:03:20 PST 2019
Author: grimar
Date: Sat Feb 9 07:03:19 2019
New Revision: 353613
URL: http://llvm.org/viewvc/llvm-project?rev=353613&view=rev
Log:
[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.
Modified:
llvm/trunk/tools/yaml2obj/yaml2elf.cpp
Modified: llvm/trunk/tools/yaml2obj/yaml2elf.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/yaml2obj/yaml2elf.cpp?rev=353613&r1=353612&r2=353613&view=diff
==============================================================================
--- llvm/trunk/tools/yaml2obj/yaml2elf.cpp (original)
+++ llvm/trunk/tools/yaml2obj/yaml2elf.cpp Sat Feb 9 07:03:19 2019
@@ -594,10 +594,10 @@ void ELFState<ELFT>::writeSectionContent
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));
}
}
More information about the llvm-commits
mailing list