miniOS
x86_64 hobby kernel with SMP, VFS, and POSIX process model
Loading...
Searching...
No Matches
elf.h File Reference
#include <miniOS/types.h>
Include dependency graph for elf.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  __attribute__
struct  Elf64_Dyn
struct  Elf64_Rela

Macros

#define ELFMAG   "\177ELF"
#define ET_EXEC   2
#define ET_DYN   3 /* position-independent executable (PIE) */
#define EM_X86_64   62
#define PT_LOAD   1
#define PT_DYNAMIC   2
#define DT_NULL   0
#define DT_RELA   7
#define DT_RELASZ   8
#define DT_RELAENT   9
#define R_X86_64_RELATIVE   8
#define ELF64_R_TYPE(i)
#define ELF_PIE_BASE   0x400000ULL
#define PF_X   1 /* Execute */
#define PF_W   2 /* Write */
#define PF_R   4 /* Read */

Functions

int elf_load (int fd, uint64_t *entry_out, uint64_t *image_end_out, uint64_t *phdr_va_out, uint16_t *phnum_out)

Macro Definition Documentation

◆ DT_NULL

#define DT_NULL   0

◆ DT_RELA

#define DT_RELA   7

◆ DT_RELAENT

#define DT_RELAENT   9

◆ DT_RELASZ

#define DT_RELASZ   8

◆ ELF64_R_TYPE

#define ELF64_R_TYPE ( i)
Value:
((uint32_t)(i))
unsigned int uint32_t
Definition types.h:34

◆ ELF_PIE_BASE

#define ELF_PIE_BASE   0x400000ULL

◆ ELFMAG

#define ELFMAG   "\177ELF"

◆ EM_X86_64

#define EM_X86_64   62

◆ ET_DYN

#define ET_DYN   3 /* position-independent executable (PIE) */

◆ ET_EXEC

#define ET_EXEC   2

◆ PF_R

#define PF_R   4 /* Read */

◆ PF_W

#define PF_W   2 /* Write */

◆ PF_X

#define PF_X   1 /* Execute */

◆ PT_DYNAMIC

#define PT_DYNAMIC   2

◆ PT_LOAD

#define PT_LOAD   1

◆ R_X86_64_RELATIVE

#define R_X86_64_RELATIVE   8

Function Documentation

◆ elf_load()

int elf_load ( int fd,
uint64_t * entry_out,
uint64_t * image_end_out,
uint64_t * phdr_va_out,
uint16_t * phnum_out )
Here is the call graph for this function:
Here is the caller graph for this function: