1 /*
2  * This file is auto-generated. Modifications will be lost.
3  *
4  * See https://android.googlesource.com/platform/bionic/+/master/libc/kernel/
5  * for more information.
6  */
7 #ifndef _UAPI_ASM_RISCV_ELF_H
8 #define _UAPI_ASM_RISCV_ELF_H
9 #include <asm/ptrace.h>
10 typedef unsigned long elf_greg_t;
11 typedef struct user_regs_struct elf_gregset_t;
12 #define ELF_NGREG (sizeof(elf_gregset_t) / sizeof(elf_greg_t))
13 typedef __u64 elf_fpreg_t;
14 typedef union __riscv_fp_state elf_fpregset_t;
15 #define ELF_NFPREG (sizeof(struct __riscv_d_ext_state) / sizeof(elf_fpreg_t))
16 #if __riscv_xlen == 64
17 #define ELF_RISCV_R_SYM(r_info) ELF64_R_SYM(r_info)
18 #define ELF_RISCV_R_TYPE(r_info) ELF64_R_TYPE(r_info)
19 #else
20 #define ELF_RISCV_R_SYM(r_info) ELF32_R_SYM(r_info)
21 #define ELF_RISCV_R_TYPE(r_info) ELF32_R_TYPE(r_info)
22 #endif
23 #define R_RISCV_NONE 0
24 #define R_RISCV_32 1
25 #define R_RISCV_64 2
26 #define R_RISCV_RELATIVE 3
27 #define R_RISCV_COPY 4
28 #define R_RISCV_JUMP_SLOT 5
29 #define R_RISCV_TLS_DTPMOD32 6
30 #define R_RISCV_TLS_DTPMOD64 7
31 #define R_RISCV_TLS_DTPREL32 8
32 #define R_RISCV_TLS_DTPREL64 9
33 #define R_RISCV_TLS_TPREL32 10
34 #define R_RISCV_TLS_TPREL64 11
35 #define R_RISCV_IRELATIVE 58
36 #define R_RISCV_BRANCH 16
37 #define R_RISCV_JAL 17
38 #define R_RISCV_CALL 18
39 #define R_RISCV_CALL_PLT 19
40 #define R_RISCV_GOT_HI20 20
41 #define R_RISCV_TLS_GOT_HI20 21
42 #define R_RISCV_TLS_GD_HI20 22
43 #define R_RISCV_PCREL_HI20 23
44 #define R_RISCV_PCREL_LO12_I 24
45 #define R_RISCV_PCREL_LO12_S 25
46 #define R_RISCV_HI20 26
47 #define R_RISCV_LO12_I 27
48 #define R_RISCV_LO12_S 28
49 #define R_RISCV_TPREL_HI20 29
50 #define R_RISCV_TPREL_LO12_I 30
51 #define R_RISCV_TPREL_LO12_S 31
52 #define R_RISCV_TPREL_ADD 32
53 #define R_RISCV_ADD8 33
54 #define R_RISCV_ADD16 34
55 #define R_RISCV_ADD32 35
56 #define R_RISCV_ADD64 36
57 #define R_RISCV_SUB8 37
58 #define R_RISCV_SUB16 38
59 #define R_RISCV_SUB32 39
60 #define R_RISCV_SUB64 40
61 #define R_RISCV_GNU_VTINHERIT 41
62 #define R_RISCV_GNU_VTENTRY 42
63 #define R_RISCV_ALIGN 43
64 #define R_RISCV_RVC_BRANCH 44
65 #define R_RISCV_RVC_JUMP 45
66 #define R_RISCV_GPREL_I 47
67 #define R_RISCV_GPREL_S 48
68 #define R_RISCV_TPREL_I 49
69 #define R_RISCV_TPREL_S 50
70 #define R_RISCV_RELAX 51
71 #define R_RISCV_SUB6 52
72 #define R_RISCV_SET6 53
73 #define R_RISCV_SET8 54
74 #define R_RISCV_SET16 55
75 #define R_RISCV_SET32 56
76 #define R_RISCV_32_PCREL 57
77 #define R_RISCV_PLT32 59
78 #define R_RISCV_SET_ULEB128 60
79 #define R_RISCV_SUB_ULEB128 61
80 #endif
81