Commit c480d891 authored by Zong Li's avatar Zong Li Committed by Palmer Dabbelt

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: default avatarZong Li <zong@andestech.com>
Signed-off-by: default avatarPalmer Dabbelt <palmer@sifive.com>
parent 8f79125d
...@@ -21,8 +21,13 @@ typedef struct user_regs_struct elf_gregset_t; ...@@ -21,8 +21,13 @@ typedef struct user_regs_struct elf_gregset_t;
typedef union __riscv_fp_state elf_fpregset_t; typedef union __riscv_fp_state elf_fpregset_t;
#define ELF_RISCV_R_SYM(r_info) ((r_info) >> 32) #if __riscv_xlen == 64
#define ELF_RISCV_R_TYPE(r_info) ((r_info) & 0xffffffff) #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 * RISC-V relocation types
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment