diff options
author | LemonBoy <thatlemon@gmail.com> | 2020-04-17 07:58:15 -0700 |
---|---|---|
committer | Fangrui Song <maskray@google.com> | 2020-04-17 08:12:15 -0700 |
commit | aff950e95d4a0b09fa8629e7358e5e06ea2ceb87 (patch) | |
tree | 0736729e149e17e22d8d79fbb40e22ad07b3d41a /lld/ELF/ScriptParser.cpp | |
parent | f89abd6923bcc0839288af4b96113a0cb4fa4edd (diff) | |
download | llvm-aff950e95d4a0b09fa8629e7358e5e06ea2ceb87.zip llvm-aff950e95d4a0b09fa8629e7358e5e06ea2ceb87.tar.gz llvm-aff950e95d4a0b09fa8629e7358e5e06ea2ceb87.tar.bz2 |
[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
Diffstat (limited to 'lld/ELF/ScriptParser.cpp')
-rw-r--r-- | lld/ELF/ScriptParser.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lld/ELF/ScriptParser.cpp b/lld/ELF/ScriptParser.cpp index 037cb9f..b487f31 100644 --- a/lld/ELF/ScriptParser.cpp +++ b/lld/ELF/ScriptParser.cpp @@ -404,6 +404,7 @@ static std::pair<ELFKind, uint16_t> parseBfdName(StringRef s) { .Case("elf64-tradlittlemips", {ELF64LEKind, EM_MIPS}) .Case("elf32-littleriscv", {ELF32LEKind, EM_RISCV}) .Case("elf64-littleriscv", {ELF64LEKind, EM_RISCV}) + .Case("elf64-sparc", {ELF64BEKind, EM_SPARCV9}) .Default({ELFNoneKind, EM_NONE}); } |