xref: /optee_os/core/arch/riscv/include/kernel/riscv_elf.h (revision f0a3f742dd27915c8649abefa5bd3d021789b7c2)
1 /* SPDX-License-Identifier: BSD-2-Clause */
2 /*
3  * Copyright (c) 2025 SiFive, Inc
4  */
5 
6 #ifndef __KERNEL_RISCV_ELF_H__
7 #define __KERNEL_RISCV_ELF_H__
8 
9 #define R_RISCV_32		1
10 #define R_RISCV_64		2
11 #define R_RISCV_RELATIVE	3
12 
13 #ifdef RV32
14 #define RELOC_TYPE		R_RISCV_32
15 #define SYM_INDEX		0x8
16 #define SYM_SIZE		0x10
17 #else
18 #define RELOC_TYPE		R_RISCV_64
19 #define SYM_INDEX		0x20
20 #define SYM_SIZE		0x18
21 #endif
22 
23 #endif /*__KERNEL_RISCV_ELF_H__*/
24