[PATCH] D98385: [lld-macho] Fix handling of X86_64_RELOC_SIGNED_{1,2,4}
Jez Ng via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 10 19:42:18 PST 2021
int3 created this revision.
Herald added a project: lld-macho.
Herald added a reviewer: lld-macho.
int3 requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
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.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D98385
Files:
lld/MachO/Arch/X86_64.cpp
lld/MachO/InputFiles.cpp
lld/MachO/Target.h
lld/test/MachO/x86-64-reloc-signed.s
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D98385.329828.patch
Type: text/x-patch
Size: 5326 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210311/dafe9bd7/attachment.bin>
More information about the llvm-commits
mailing list