mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-12-02 00:40:59 -05: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 <[email protected]> Signed-off-by: Palmer Dabbelt <[email protected]>
This commit is contained in:
parent
8f79125d28
commit
c480d8911f
1 changed files with 7 additions and 2 deletions
|
|
@ -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 a new issue