[ELF] Support a few more SPARCv9 relocations
authorLemonBoy <thatlemon@gmail.com>
Fri, 17 Apr 2020 14:58:15 +0000 (07:58 -0700)
committerFangrui Song <maskray@google.com>
Fri, 17 Apr 2020 15:12:15 +0000 (08:12 -0700)
commitaff950e95d4a0b09fa8629e7358e5e06ea2ceb87
tree0736729e149e17e22d8d79fbb40e22ad07b3d41a
parentf89abd6923bcc0839288af4b96113a0cb4fa4edd
[ELF] Support a few more SPARCv9 relocations

Implemented a bunch of relocations found in binaries with medium/large code model and the Local-Exec TLS model. The binaries link and run fine in Qemu.
In addition, the emulation `elf64_sparc` is now recognized.

Reviewed By: MaskRay

Differential Revision: https://reviews.llvm.org/D77672
lld/ELF/Arch/SPARCV9.cpp
lld/ELF/Driver.cpp
lld/ELF/InputSection.cpp
lld/ELF/ScriptParser.cpp
lld/test/ELF/emulation-sparc.s [new file with mode: 0644]
lld/test/ELF/sparcv9-reloc.s [new file with mode: 0644]
lld/test/ELF/sparcv9-tls-le.s [new file with mode: 0644]