Skip to content

Commit 6d6a041

Browse files
committed
[RISCV] Recognize new relocation types
This patch adds all RISC-V relocation types, as of binutils 2.29. Note that R_RISCV32_PCREL is not currently documented in the RISC-V ELF PSABI. Differential Revision: https://reviews.llvm.org/D36455 Patch by Chih-Mao Chen (@PkmX) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@310914 91177308-0d34-0410-b5e6-96231b3b80d8
1 parent 745921f commit 6d6a041

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

include/llvm/BinaryFormat/ELFRelocs/RISCV.def

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,3 +48,12 @@ ELF_RELOC(R_RISCV_RVC_JUMP, 45)
4848
ELF_RELOC(R_RISCV_RVC_LUI, 46)
4949
ELF_RELOC(R_RISCV_GPREL_I, 47)
5050
ELF_RELOC(R_RISCV_GPREL_S, 48)
51+
ELF_RELOC(R_RISCV_TPREL_I, 49)
52+
ELF_RELOC(R_RISCV_TPREL_S, 50)
53+
ELF_RELOC(R_RISCV_RELAX, 51)
54+
ELF_RELOC(R_RISCV_SUB6, 52)
55+
ELF_RELOC(R_RISCV_SET6, 53)
56+
ELF_RELOC(R_RISCV_SET8, 54)
57+
ELF_RELOC(R_RISCV_SET16, 55)
58+
ELF_RELOC(R_RISCV_SET32, 56)
59+
ELF_RELOC(R_RISCV_32_PCREL, 57)

0 commit comments

Comments
 (0)