Index: lld/trunk/lib/ReaderWriter/MachO/MachONormalizedFileBinaryReader.cpp =================================================================== --- lld/trunk/lib/ReaderWriter/MachO/MachONormalizedFileBinaryReader.cpp +++ lld/trunk/lib/ReaderWriter/MachO/MachONormalizedFileBinaryReader.cpp @@ -508,9 +508,9 @@ if (dyldInfo) { // If any exports, extract and add to normalized exportInfo vector. if (dyldInfo->export_size) { - const uint8_t *trieStart = reinterpret_cast(start + - dyldInfo->export_off); - ArrayRef trie(trieStart, dyldInfo->export_size); + const uint8_t *trieStart = reinterpret_cast( + start + read32(&dyldInfo->export_off, isBig)); + ArrayRef trie(trieStart, read32(&dyldInfo->export_size, isBig)); for (const ExportEntry &trieExport : MachOObjectFile::exports(trie)) { Export normExport; normExport.name = trieExport.name().copy(f->ownedAllocations);