diff options
| author | Jakub Konka <kubkon@jakubkonka.com> | 2024-02-17 08:45:42 +0100 |
|---|---|---|
| committer | Jakub Konka <kubkon@jakubkonka.com> | 2024-02-17 08:45:42 +0100 |
| commit | 70a5dca13eb19199124a5f1dc5e19fc059906238 (patch) | |
| tree | ad10b7b44b5fb3e5432c7cc27c51391c3b80b952 /lib/std/elf.zig | |
| parent | fc7dd3e285889cd0f75e7270bb0021ad32f73ca3 (diff) | |
| download | zig-70a5dca13eb19199124a5f1dc5e19fc059906238.tar.gz zig-70a5dca13eb19199124a5f1dc5e19fc059906238.zip | |
elf: add riscv reloc types
Diffstat (limited to 'lib/std/elf.zig')
| -rw-r--r-- | lib/std/elf.zig | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/lib/std/elf.zig b/lib/std/elf.zig index faeb94f96a..518e9910c1 100644 --- a/lib/std/elf.zig +++ b/lib/std/elf.zig @@ -2164,6 +2164,66 @@ pub const R_AARCH64_TLSDESC = 1031; /// STT_GNU_IFUNC relocation. pub const R_AARCH64_IRELATIVE = 1032; +/// RISC-V relocations. +pub const R_RISCV_R_RISCV_NONE = 0; +pub const R_RISCV_R_RISCV_32 = 1; +pub const R_RISCV_R_RISCV_64 = 2; +pub const R_RISCV_R_RISCV_RELATIVE = 3; +pub const R_RISCV_R_RISCV_COPY = 4; +pub const R_RISCV_R_RISCV_JUMP_SLOT = 5; +pub const R_RISCV_R_RISCV_TLS_DTPMOD32 = 6; +pub const R_RISCV_R_RISCV_TLS_DTPMOD64 = 7; +pub const R_RISCV_R_RISCV_TLS_DTPREL32 = 8; +pub const R_RISCV_R_RISCV_TLS_DTPREL64 = 9; +pub const R_RISCV_R_RISCV_TLS_TPREL32 = 10; +pub const R_RISCV_R_RISCV_TLS_TPREL64 = 11; +pub const R_RISCV_R_RISCV_BRANCH = 16; +pub const R_RISCV_R_RISCV_JAL = 17; +pub const R_RISCV_R_RISCV_CALL = 18; +pub const R_RISCV_R_RISCV_CALL_PLT = 19; +pub const R_RISCV_R_RISCV_GOT_HI20 = 20; +pub const R_RISCV_R_RISCV_TLS_GOT_HI20 = 21; +pub const R_RISCV_R_RISCV_TLS_GD_HI20 = 22; +pub const R_RISCV_R_RISCV_PCREL_HI20 = 23; +pub const R_RISCV_R_RISCV_PCREL_LO12_I = 24; +pub const R_RISCV_R_RISCV_PCREL_LO12_S = 25; +pub const R_RISCV_R_RISCV_HI20 = 26; +pub const R_RISCV_R_RISCV_LO12_I = 27; +pub const R_RISCV_R_RISCV_LO12_S = 28; +pub const R_RISCV_R_RISCV_TPREL_HI20 = 29; +pub const R_RISCV_R_RISCV_TPREL_LO12_I = 30; +pub const R_RISCV_R_RISCV_TPREL_LO12_S = 31; +pub const R_RISCV_R_RISCV_TPREL_ADD = 32; +pub const R_RISCV_R_RISCV_ADD8 = 33; +pub const R_RISCV_R_RISCV_ADD16 = 34; +pub const R_RISCV_R_RISCV_ADD32 = 35; +pub const R_RISCV_R_RISCV_ADD64 = 36; +pub const R_RISCV_R_RISCV_SUB8 = 37; +pub const R_RISCV_R_RISCV_SUB16 = 38; +pub const R_RISCV_R_RISCV_SUB32 = 39; +pub const R_RISCV_R_RISCV_SUB64 = 40; +pub const R_RISCV_R_RISCV_GNU_VTINHERIT = 41; +pub const R_RISCV_R_RISCV_GNU_VTENTRY = 42; +pub const R_RISCV_R_RISCV_ALIGN = 43; +pub const R_RISCV_R_RISCV_RVC_BRANCH = 44; +pub const R_RISCV_R_RISCV_RVC_JUMP = 45; +pub const R_RISCV_R_RISCV_RVC_LUI = 46; +pub const R_RISCV_R_RISCV_GPREL_I = 47; +pub const R_RISCV_R_RISCV_GPREL_S = 48; +pub const R_RISCV_R_RISCV_TPREL_I = 49; +pub const R_RISCV_R_RISCV_TPREL_S = 50; +pub const R_RISCV_R_RISCV_RELAX = 51; +pub const R_RISCV_R_RISCV_SUB6 = 52; +pub const R_RISCV_R_RISCV_SET6 = 53; +pub const R_RISCV_R_RISCV_SET8 = 54; +pub const R_RISCV_R_RISCV_SET16 = 55; +pub const R_RISCV_R_RISCV_SET32 = 56; +pub const R_RISCV_R_RISCV_32_PCREL = 57; +pub const R_RISCV_R_RISCV_IRELATIVE = 58; +pub const R_RISCV_R_RISCV_PLT32 = 59; +pub const R_RISCV_R_RISCV_SET_ULEB128 = 60; +pub const R_RISCV_R_RISCV_SUB_ULEB128 = 61; + pub const STV = enum(u2) { DEFAULT = 0, INTERNAL = 1, |
