[lld-macho] Implement LC_UUID
Apple devtools use this to locate the dSYM files for a given binary. The UUID is computed based on an MD5 hash of the binary's contents. In order to hash the contents, we must first write them, but LC_UUID itself must be part of the written contents in order for all the offsets to be calculated correctly. We resolve this circular paradox by first writing an LC_UUID with an all-zero UUID, then updating the UUID with its real value later. I'm not sure there's a good way to test that the value of the UUID is "as expected", so I've just checked that it's present. Reviewed By: #lld-macho, compnerd, smeenai Differential Revision: https://reviews.llvm.org/D89418
Loading
Please sign in to comment