Index: lib/Support/ARMAttributeParser.cpp =================================================================== --- lib/Support/ARMAttributeParser.cpp +++ lib/Support/ARMAttributeParser.cpp @@ -685,9 +685,9 @@ unsigned SectionNumber = 0; while (Offset < Section.size()) { - uint32_t SectionLength = isLittle ? - *reinterpret_cast(Section.data() + Offset) : - *reinterpret_cast(Section.data() + Offset); + uint32_t SectionLength = + isLittle ? support::endian::read32le(Section.data() + Offset) + : support::endian::read32be(Section.data() + Offset); if (SW) { SW->startLine() << "Section " << ++SectionNumber << " {\n";