122851890Sopenharmony_ci/****************************************************************************
222851890Sopenharmony_ci ****************************************************************************
322851890Sopenharmony_ci ***
422851890Sopenharmony_ci ***   This header was automatically generated from a Linux kernel header
522851890Sopenharmony_ci ***   of the same name, to make information necessary for userspace to
622851890Sopenharmony_ci ***   call into the kernel available to libc.  It contains only constants,
722851890Sopenharmony_ci ***   structures, and macros generated from the original header, and thus,
822851890Sopenharmony_ci ***   contains no copyrightable information.
922851890Sopenharmony_ci ***
1022851890Sopenharmony_ci ***   To edit the content of this header, modify the corresponding
1122851890Sopenharmony_ci ***   source file (e.g. under external/kernel-headers/original/) then
1222851890Sopenharmony_ci ***   run bionic/libc/kernel/tools/update_all.py
1322851890Sopenharmony_ci ***
1422851890Sopenharmony_ci ***   Any manual change here will be lost the next time this script will
1522851890Sopenharmony_ci ***   be run. You've been warned!
1622851890Sopenharmony_ci ***
1722851890Sopenharmony_ci ****************************************************************************
1822851890Sopenharmony_ci ****************************************************************************/
1922851890Sopenharmony_ci#ifndef _ASM_RISCV_ELF_H
2022851890Sopenharmony_ci#define _ASM_RISCV_ELF_H
2122851890Sopenharmony_ci#include <asm/ptrace.h>
2222851890Sopenharmony_citypedef unsigned long elf_greg_t;
2322851890Sopenharmony_citypedef struct user_regs_struct elf_gregset_t;
2422851890Sopenharmony_ci#define ELF_NGREG (sizeof(elf_gregset_t) / sizeof(elf_greg_t))
2522851890Sopenharmony_citypedef __u64 elf_fpreg_t;
2622851890Sopenharmony_citypedef union __riscv_fp_state elf_fpregset_t;
2722851890Sopenharmony_ci#define ELF_NFPREG (sizeof(struct __riscv_d_ext_state) / sizeof(elf_fpreg_t))
2822851890Sopenharmony_ci#if __riscv_xlen == 64
2922851890Sopenharmony_ci#define ELF_RISCV_R_SYM(r_info) ELF64_R_SYM(r_info)
3022851890Sopenharmony_ci#define ELF_RISCV_R_TYPE(r_info) ELF64_R_TYPE(r_info)
3122851890Sopenharmony_ci#else
3222851890Sopenharmony_ci#define ELF_RISCV_R_SYM(r_info) ELF32_R_SYM(r_info)
3322851890Sopenharmony_ci#define ELF_RISCV_R_TYPE(r_info) ELF32_R_TYPE(r_info)
3422851890Sopenharmony_ci#endif
3522851890Sopenharmony_ci#define R_RISCV_NONE 0
3622851890Sopenharmony_ci#define R_RISCV_32 1
3722851890Sopenharmony_ci#define R_RISCV_64 2
3822851890Sopenharmony_ci#define R_RISCV_RELATIVE 3
3922851890Sopenharmony_ci#define R_RISCV_COPY 4
4022851890Sopenharmony_ci#define R_RISCV_JUMP_SLOT 5
4122851890Sopenharmony_ci#define R_RISCV_TLS_DTPMOD32 6
4222851890Sopenharmony_ci#define R_RISCV_TLS_DTPMOD64 7
4322851890Sopenharmony_ci#define R_RISCV_TLS_DTPREL32 8
4422851890Sopenharmony_ci#define R_RISCV_TLS_DTPREL64 9
4522851890Sopenharmony_ci#define R_RISCV_TLS_TPREL32 10
4622851890Sopenharmony_ci#define R_RISCV_TLS_TPREL64 11
4722851890Sopenharmony_ci#define R_RISCV_BRANCH 16
4822851890Sopenharmony_ci#define R_RISCV_JAL 17
4922851890Sopenharmony_ci#define R_RISCV_CALL 18
5022851890Sopenharmony_ci#define R_RISCV_CALL_PLT 19
5122851890Sopenharmony_ci#define R_RISCV_GOT_HI20 20
5222851890Sopenharmony_ci#define R_RISCV_TLS_GOT_HI20 21
5322851890Sopenharmony_ci#define R_RISCV_TLS_GD_HI20 22
5422851890Sopenharmony_ci#define R_RISCV_PCREL_HI20 23
5522851890Sopenharmony_ci#define R_RISCV_PCREL_LO12_I 24
5622851890Sopenharmony_ci#define R_RISCV_PCREL_LO12_S 25
5722851890Sopenharmony_ci#define R_RISCV_HI20 26
5822851890Sopenharmony_ci#define R_RISCV_LO12_I 27
5922851890Sopenharmony_ci#define R_RISCV_LO12_S 28
6022851890Sopenharmony_ci#define R_RISCV_TPREL_HI20 29
6122851890Sopenharmony_ci#define R_RISCV_TPREL_LO12_I 30
6222851890Sopenharmony_ci#define R_RISCV_TPREL_LO12_S 31
6322851890Sopenharmony_ci#define R_RISCV_TPREL_ADD 32
6422851890Sopenharmony_ci#define R_RISCV_ADD8 33
6522851890Sopenharmony_ci#define R_RISCV_ADD16 34
6622851890Sopenharmony_ci#define R_RISCV_ADD32 35
6722851890Sopenharmony_ci#define R_RISCV_ADD64 36
6822851890Sopenharmony_ci#define R_RISCV_SUB8 37
6922851890Sopenharmony_ci#define R_RISCV_SUB16 38
7022851890Sopenharmony_ci#define R_RISCV_SUB32 39
7122851890Sopenharmony_ci#define R_RISCV_SUB64 40
7222851890Sopenharmony_ci#define R_RISCV_GNU_VTINHERIT 41
7322851890Sopenharmony_ci#define R_RISCV_GNU_VTENTRY 42
7422851890Sopenharmony_ci#define R_RISCV_ALIGN 43
7522851890Sopenharmony_ci#define R_RISCV_RVC_BRANCH 44
7622851890Sopenharmony_ci#define R_RISCV_RVC_JUMP 45
7722851890Sopenharmony_ci#define R_RISCV_LUI 46
7822851890Sopenharmony_ci#define R_RISCV_GPREL_I 47
7922851890Sopenharmony_ci#define R_RISCV_GPREL_S 48
8022851890Sopenharmony_ci#define R_RISCV_TPREL_I 49
8122851890Sopenharmony_ci#define R_RISCV_TPREL_S 50
8222851890Sopenharmony_ci#define R_RISCV_RELAX 51
8322851890Sopenharmony_ci#define R_RISCV_SUB6 52
8422851890Sopenharmony_ci#define R_RISCV_SET6 53
8522851890Sopenharmony_ci#define R_RISCV_SET8 54
8622851890Sopenharmony_ci#define R_RISCV_SET16 55
8722851890Sopenharmony_ci#define R_RISCV_SET32 56
8822851890Sopenharmony_ci#define R_RISCV_32_PCREL 57
8922851890Sopenharmony_ci#endif
90