Index: llvm/trunk/lib/Support/ARMAttributeParser.cpp =================================================================== --- llvm/trunk/lib/Support/ARMAttributeParser.cpp +++ llvm/trunk/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";