projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8f79125
)
RISC-V: Add definiion of extract symbol's index and type for 32-bit
author
Zong Li
<
[email protected]
>
Mon, 25 Jun 2018 08:49:39 +0000
(16:49 +0800)
committer
Palmer Dabbelt
<
[email protected]
>
Wed, 4 Jul 2018 20:54:08 +0000
(13:54 -0700)
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]
>
arch/riscv/include/uapi/asm/elf.h
patch
|
blob
|
history
diff --git
a/arch/riscv/include/uapi/asm/elf.h
b/arch/riscv/include/uapi/asm/elf.h
index 5cae4c30cd8e2e2147b59285f9eccaaae7e9a789..1e0dfc36aab9e597aaf0d0fb3c99b2ac3dcae750 100644
(file)
--- a/
arch/riscv/include/uapi/asm/elf.h
+++ b/
arch/riscv/include/uapi/asm/elf.h
@@
-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