We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8f79125 commit c480d89Copy full SHA for c480d89
arch/riscv/include/uapi/asm/elf.h
@@ -21,8 +21,13 @@ typedef struct user_regs_struct elf_gregset_t;
21
22
typedef union __riscv_fp_state elf_fpregset_t;
23
24
-#define ELF_RISCV_R_SYM(r_info) ((r_info) >> 32)
25
-#define ELF_RISCV_R_TYPE(r_info) ((r_info) & 0xffffffff)
+#if __riscv_xlen == 64
+#define ELF_RISCV_R_SYM(r_info) ELF64_R_SYM(r_info)
26
+#define ELF_RISCV_R_TYPE(r_info) ELF64_R_TYPE(r_info)
27
+#else
28
+#define ELF_RISCV_R_SYM(r_info) ELF32_R_SYM(r_info)
29
+#define ELF_RISCV_R_TYPE(r_info) ELF32_R_TYPE(r_info)
30
+#endif
31
32
/*
33
* RISC-V relocation types
0 commit comments