#include <ubixos/types.h>
#include <ubixos/sched.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.
Data Structures | |
struct | Elf_Auxargs |
struct | elfDynamic |
struct | elfDynSym |
struct | elfHeader |
struct | elfPltInfo |
struct | elfProgramHeader |
struct | elfSectionHeader |
Defines | |
#define | ELF32_R_INFO(s, t) ((s)<<8+(unsigned char)(t)) |
#define | ELF32_R_SYM(i) ((i)>>8) |
#define | ELF32_R_TYPE(i) ((unsigned char)(i)) |
#define | elfExecutable 0x002 |
#define | elfLibrary 0x003 |
#define | EM_386 3 |
#define | EM_68K 4 |
#define | EM_860 7 |
#define | EM_88K 5 |
#define | EM_M32 1 |
#define | EM_MIPS 8 |
#define | EM_NONE 0 |
#define | EM_SPARC 2 |
#define | ET_CORE 4 |
#define | ET_DYN 3 |
#define | ET_EXEC 2 |
#define | ET_HIPROC 0xffff |
#define | ET_LOPROC 0xff00 |
#define | ET_NONE 0 |
#define | ET_REL 1 |
#define | EV_CURRENT 1 |
#define | EV_NONE 0 |
#define | PT_DYNAMIC 2 |
#define | PT_GNU_EH_FRAME 0x6474e550 |
#define | PT_GNU_RELRO (PT_LOOS + 0x474e552) |
#define | PT_GNU_STACK (PT_LOOS + 0x474e551) |
#define | PT_HIOS 0x6fffffff |
#define | PT_HIPROC 0x7fffffff |
#define | PT_INTERP 3 |
#define | PT_LOAD 1 |
#define | PT_LOOS 0x60000000 |
#define | PT_LOPROC 0x70000000 |
#define | PT_NOTE 4 |
#define | PT_NULL 0 |
#define | PT_PAX_FLAGS (PT_LOOS + 0x5041580) |
#define | PT_PHDR 6 |
#define | PT_SHLIB 5 |
#define | R_386_32 1 |
#define | R_386_COPY 5 |
#define | R_386_GLOB_DAT 6 |
#define | R_386_GOT32 3 |
#define | R_386_GOTOFF 9 |
#define | R_386_GOTPC 10 |
#define | R_386_JMP_SLOT 7 |
#define | R_386_NONE 0 |
#define | R_386_PC32 2 |
#define | R_386_PLT32 4 |
#define | R_386_RELATIVE 8 |
Functions | |
int | elf_loadfile (kTask_t *p, const char *file, uint32_t *addr, uint32_t *entry) |
char * | elfGetPhType (int) |
char * | elfGetRelType (int) |
char * | elfGetShType (int) |
#define ELF32_R_SYM | ( | i | ) | ((i)>>8) |
#define ELF32_R_TYPE | ( | i | ) | ((unsigned char)(i)) |
#define ET_DYN 3 |
#define ET_EXEC 2 |
#define PT_DYNAMIC 2 |
#define PT_GNU_STACK (PT_LOOS + 0x474e551) |
#define PT_INTERP 3 |
#define PT_LOAD 1 |
Definition at line 80 of file elf.h.
Referenced by elf_loadfile(), kmod_load(), ldEnable(), sys_exec(), and sysExec().
#define PT_PAX_FLAGS (PT_LOOS + 0x5041580) |
#define PT_PHDR 6 |
#define R_386_32 1 |
#define R_386_PC32 2 |
#define R_386_RELATIVE 8 |
Definition at line 111 of file elf.c.
References _current, elfHeader::eEntry, elfHeader::eIdent, elfHeader::ePhnum, elfHeader::ePhoff, ET_DYN, ET_EXEC, elfHeader::eType, fclose(), fopen(), fread(), fseek(), taskStruct::id, K_PANIC, kfree(), kmalloc(), kprintf(), memset(), PAGE_DEFAULT, PAGE_PRESENT, PAGE_USER, elfProgramHeader::phMemsz, elfProgramHeader::phVaddr, PT_LOAD, vmm_remapPage(), vmm_setPageAttributes(), vmmFindFreePage(), and x1000.
Here is the call graph for this function:
char* elfGetPhType | ( | int | ) |
char* elfGetRelType | ( | int | ) |
Definition at line 107 of file elf.c.
References elfRelType, and relTypeName.
Referenced by kmod_load(), and ldEnable().
char* elfGetShType | ( | int | ) |