Changeset View
Changeset View
Standalone View
Standalone View
head/sys/riscv/include/elf.h
Show First 20 Lines • Show All 59 Lines • ▼ Show 20 Lines | |||||
} Elf64_Auxinfo; | } Elf64_Auxinfo; | ||||
__ElfType(Auxinfo); | __ElfType(Auxinfo); | ||||
#define ELF_ARCH EM_RISCV | #define ELF_ARCH EM_RISCV | ||||
#define ELF_MACHINE_OK(x) ((x) == (ELF_ARCH)) | #define ELF_MACHINE_OK(x) ((x) == (ELF_ARCH)) | ||||
/* Values for a_type. */ | |||||
#define AT_NULL 0 /* Terminates the vector. */ | |||||
#define AT_IGNORE 1 /* Ignored entry. */ | |||||
#define AT_EXECFD 2 /* File descriptor of program to load. */ | |||||
#define AT_PHDR 3 /* Program header of program already loaded. */ | |||||
#define AT_PHENT 4 /* Size of each program header entry. */ | |||||
#define AT_PHNUM 5 /* Number of program header entries. */ | |||||
#define AT_PAGESZ 6 /* Page size in bytes. */ | |||||
#define AT_BASE 7 /* Interpreter's base address. */ | |||||
#define AT_FLAGS 8 /* Flags (unused). */ | |||||
#define AT_ENTRY 9 /* Where interpreter should transfer control. */ | |||||
#define AT_NOTELF 10 /* Program is not ELF ?? */ | |||||
#define AT_UID 11 /* Real uid. */ | |||||
#define AT_EUID 12 /* Effective uid. */ | |||||
#define AT_GID 13 /* Real gid. */ | |||||
#define AT_EGID 14 /* Effective gid. */ | |||||
#define AT_EXECPATH 15 /* Path to the executable. */ | |||||
#define AT_CANARY 16 /* Canary for SSP */ | |||||
#define AT_CANARYLEN 17 /* Length of the canary. */ | |||||
#define AT_OSRELDATE 18 /* OSRELDATE. */ | |||||
#define AT_NCPUS 19 /* Number of CPUs. */ | |||||
#define AT_PAGESIZES 20 /* Pagesizes. */ | |||||
#define AT_PAGESIZESLEN 21 /* Number of pagesizes. */ | |||||
#define AT_TIMEKEEP 22 /* Pointer to timehands. */ | |||||
#define AT_STACKPROT 23 /* Initial stack protection. */ | |||||
#define AT_EHDRFLAGS 24 /* e_flags field from elf hdr */ | |||||
#define AT_HWCAP 25 /* CPU feature flags. */ | |||||
#define AT_HWCAP2 26 /* CPU feature flags 2. */ | |||||
#define AT_COUNT 27 /* Count of defined aux entry types. */ | |||||
/* Define "machine" characteristics */ | /* Define "machine" characteristics */ | ||||
#define ELF_TARG_CLASS ELFCLASS64 | #define ELF_TARG_CLASS ELFCLASS64 | ||||
#define ELF_TARG_DATA ELFDATA2LSB | #define ELF_TARG_DATA ELFDATA2LSB | ||||
#define ELF_TARG_MACH EM_RISCV | #define ELF_TARG_MACH EM_RISCV | ||||
#define ELF_TARG_VER 1 | #define ELF_TARG_VER 1 | ||||
/* TODO: set correct value */ | /* TODO: set correct value */ | ||||
#define ET_DYN_LOAD_ADDR 0x100000 | #define ET_DYN_LOAD_ADDR 0x100000 | ||||
#endif /* !_MACHINE_ELF_H_ */ | #endif /* !_MACHINE_ELF_H_ */ |