[lld-macho] Properly handle & validate relocation r_length
Summary: We should be reading / writing our addends / relocated addresses based on r_length, and not just based on the type of the relocation. But since only some r_length values are valid for a given reloc type, I've also added some validation. ld64 has code to allow for r_length = 0 in X86_64_RELOC_BRANCH relocs, but I'm not sure how to create such a relocation... Reviewed By: smeenai Differential Revision: https://reviews.llvm.org/D80854
Loading
Please register or sign in to comment