forked from OSchip/llvm-project
lld matching change for llvm change r308690 to add error handling to
the dyld compact export entries in libObject. llvm-svn: 308691
This commit is contained in:
parent
3e95bd2239
commit
b4c351dfd1
|
@ -511,7 +511,8 @@ readBinary(std::unique_ptr<MemoryBuffer> &mb,
|
|||
const uint8_t *trieStart = reinterpret_cast<const uint8_t *>(
|
||||
start + read32(&dyldInfo->export_off, isBig));
|
||||
ArrayRef<uint8_t> trie(trieStart, read32(&dyldInfo->export_size, isBig));
|
||||
for (const ExportEntry &trieExport : MachOObjectFile::exports(trie)) {
|
||||
Error Err = Error::success();
|
||||
for (const ExportEntry &trieExport : MachOObjectFile::exports(Err, trie)) {
|
||||
Export normExport;
|
||||
normExport.name = trieExport.name().copy(f->ownedAllocations);
|
||||
normExport.offset = trieExport.address();
|
||||
|
@ -522,6 +523,8 @@ readBinary(std::unique_ptr<MemoryBuffer> &mb,
|
|||
normExport.otherName = trieExport.otherName().copy(f->ownedAllocations);
|
||||
f->exportInfo.push_back(normExport);
|
||||
}
|
||||
if (Err)
|
||||
return std::move(Err);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue