Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -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