Skip to content
Commit b7e12ca7 authored by Jez Ng's avatar Jez Ng
Browse files

[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
parent 665060ea
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment