[lld-macho] Fix handling of X86_64_RELOC_SIGNED_{1,2,4}
The previous implementation miscalculated the addend, resulting in an underflow. This meant that every SIGNED_N section relocation would be associated with the last subsection (since the addend would now be a huge number). We were "lucky" that this mistake was typically cancelled out -- 64-to-32-bit-truncation meant that the final value was correct, as long as subsections were not rearranged. Reviewed By: #lld-macho, thakis Differential Revision: https://reviews.llvm.org/D98385
Loading
Please sign in to comment