[lld-macho] If export_size is zero, export_off must be zero
Otherwise tools like codesign_allocate will choke. We were already handling this correctly for the other DYLD_INFO sections. Doing this correctly is a bit subtle: we don't know if export_size will be zero until we have run `ExportSection::finalizeContents()`. However, we must still add the ExportSection to the `__LINKEDIT` segment in order that it gets sorted during `sortSectionsAndSegments()`. Reviewed By: #lld-macho, oontvoo Differential Revision: https://reviews.llvm.org/D112589
Loading
Please register or sign in to comment