diff options
author | Jon Santmyer <jon@jonsantmyer.com> | 2024-05-22 13:00:41 -0400 |
---|---|---|
committer | Jon Santmyer <jon@jonsantmyer.com> | 2024-05-22 13:00:41 -0400 |
commit | ace65b453151845bc361f21f3e5b651c35f9f126 (patch) | |
tree | 262ebd29b0ca1d8584f0b6f1efa7a00d9f4f3e43 /arch/x86_64/elf.h | |
parent | f004c1ade8d617a82cea2fe249434cccb47a2358 (diff) | |
download | jove-kernel-ace65b453151845bc361f21f3e5b651c35f9f126.tar.gz jove-kernel-ace65b453151845bc361f21f3e5b651c35f9f126.tar.bz2 jove-kernel-ace65b453151845bc361f21f3e5b651c35f9f126.zip |
Diffstat (limited to 'arch/x86_64/elf.h')
-rw-r--r-- | arch/x86_64/elf.h | 78 |
1 files changed, 0 insertions, 78 deletions
diff --git a/arch/x86_64/elf.h b/arch/x86_64/elf.h deleted file mode 100644 index ebcd228..0000000 --- a/arch/x86_64/elf.h +++ /dev/null @@ -1,78 +0,0 @@ -#ifndef JOVE_ARCH_x86_64_ELF_H -#define JOVE_ARCH_x86_64_ELF_H 1 - -#include <stdint.h> - -#define EI_MAG0 0 -#define EI_MAG1 1 -#define EI_MAG2 2 -#define EI_MAG3 3 -#define EI_CLASS 4 -#define EI_DATA 5 -#define EI_VERSION 6 -#define EI_OSABI 7 -#define EI_ABIVERSION 8 -#define EI_PAD 9 - -#define E_IDENT_MAG0 0x7F -#define E_IDENT_MAG1 'E' -#define E_IDENT_MAG2 'L' -#define E_IDENT_MAG3 'F' - -#define E_IDENT_CLASS32 1 -#define E_IDENT_CLASS64 2 - -#define ET_EXEC 0x02 - -struct ELF_header -{ - uint8_t e_ident[15]; - uint16_t e_type; - uint16_t e_machine; - uint32_t e_version; - uint64_t e_entry; - uint64_t e_phoff; - uint64_t e_shoff; - uint32_t e_flags; - uint16_t e_ehsize; - uint16_t e_phentsize; - uint16_t e_phnum; - uint16_t e_shentsize; - uint16_t e_shnum; - uint16_t e_shstrndx; -}; - -#define PT_NULL 0 -#define PT_LOAD 1 - -#define PF_X 1 -#define PF_W 2 -#define PF_R 4 - -struct ELF_phdr -{ - uint32_t p_type; - uint32_t p_flags; - uint64_t p_offset; - uint64_t p_vaddr; - uint64_t p_paddr; - uint64_t p_filesz; - uint64_t p_memsz; - uint64_t p_align; -}; - -struct ELF_shdr -{ - uint32_t sh_name; - uint32_t sh_type; - uint64_t sh_flags; - uint64_t sh_addr; - uint64_t sh_offset; - uint64_t sh_size; - uint32_t sh_link; - uint32_t sh_info; - uint64_t sh_addralign; - uint64_t sh_entsize; -}; - -#endif |