[lld-macho] Support X86_64_RELOC_SIGNED_{1,2,4}
authorFangrui Song <maskray@google.com>
Mon, 4 May 2020 02:25:30 +0000 (19:25 -0700)
committerFangrui Song <maskray@google.com>
Mon, 4 May 2020 22:15:35 +0000 (15:15 -0700)
commit6939fe6e0853638c2f25569e4b42a1363914d7f9
tree297cebdcda0ba5ab34db8466a8d710d481bb8075
parent156092bbcc0782b049da3e346cad59b92438ce72
[lld-macho] Support X86_64_RELOC_SIGNED_{1,2,4}

We currently only support extern relocations.
`X86_64_RELOC_SIGNED_{1,2,4}` are like X86_64_RELOC_SIGNED, but with the
implicit addend fixed to 1, 2, and 4, respectively.
See the comment in `lib/Target/X86/MCTargetDesc/X86MachObjectWriter.cpp RecordX86_64Relocation`.

Reviewed By: int3

Differential Revision: https://reviews.llvm.org/D79311
lld/MachO/Arch/X86_64.cpp
lld/test/MachO/x86-64-reloc-signed.s [new file with mode: 0644]