mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-15 08:14:15 +08:00
RISC-V: Add definiion of extract symbol's index and type for 32-bit
Use generic marco to get the index and type of symbol. Signed-off-by: Zong Li <zong@andestech.com> Signed-off-by: Palmer Dabbelt <palmer@sifive.com>
This commit is contained in:
parent
8f79125d28
commit
c480d8911f
@ -21,8 +21,13 @@ typedef struct user_regs_struct elf_gregset_t;
|
||||
|
||||
typedef union __riscv_fp_state elf_fpregset_t;
|
||||
|
||||
#define ELF_RISCV_R_SYM(r_info) ((r_info) >> 32)
|
||||
#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)
|
||||
#define ELF_RISCV_R_TYPE(r_info) ELF64_R_TYPE(r_info)
|
||||
#else
|
||||
#define ELF_RISCV_R_SYM(r_info) ELF32_R_SYM(r_info)
|
||||
#define ELF_RISCV_R_TYPE(r_info) ELF32_R_TYPE(r_info)
|
||||
#endif
|
||||
|
||||
/*
|
||||
* RISC-V relocation types
|
||||
|
Loading…
Reference in New Issue
Block a user