mirror of
https://github.com/EnderIce2/Fennix.git
synced 2025-05-28 15:34:31 +00:00
fix(kernel/elf): interpreter loading is now correctly implemented
ref: linux @ fs/binfmt_elf.c Signed-off-by: EnderIce2 <enderice2@protonmail.com>
This commit is contained in:
parent
91ad0e14df
commit
c660a7fe4f
File diff suppressed because it is too large
Load Diff
@ -689,6 +689,8 @@ enum SpecialSections
|
||||
#define NT_MIPS_MSA 0x802
|
||||
#define NT_VERSION 1
|
||||
|
||||
#define NT_GNU_PROPERTY_TYPE_0 5
|
||||
|
||||
typedef struct elf32_hdr
|
||||
{
|
||||
unsigned char e_ident[EI_NIDENT];
|
||||
@ -968,6 +970,9 @@ typedef Elf64_Rel Elf_Rel;
|
||||
typedef Elf64_Sym Elf_Sym;
|
||||
typedef Elf64_Dyn Elf_Dyn;
|
||||
typedef Elf64_Rela Elf_Rela;
|
||||
typedef Elf64_Nhdr Elf_Nhdr;
|
||||
typedef Elf64_Prstatus Elf_Prstatus;
|
||||
typedef Elf64_Prpsinfo Elf_Prpsinfo;
|
||||
#elif defined(__i386__) || defined(__arm__)
|
||||
typedef Elf32_Addr Elf_Addr;
|
||||
typedef Elf32_Half Elf_Half;
|
||||
@ -982,6 +987,9 @@ typedef Elf32_Rel Elf_Rel;
|
||||
typedef Elf32_Sym Elf_Sym;
|
||||
typedef Elf32_Dyn Elf_Dyn;
|
||||
typedef Elf32_Rela Elf_Rela;
|
||||
typedef Elf32_Nhdr Elf_Nhdr;
|
||||
typedef Elf32_Prstatus Elf_Prstatus;
|
||||
typedef Elf32_Prpsinfo Elf_Prpsinfo;
|
||||
#endif
|
||||
|
||||
#endif // !__FENNIX_KERNEL_ELF_H__
|
||||
|
@ -66,20 +66,15 @@ namespace Execute
|
||||
Tasking::IP ip;
|
||||
void *ELFProgramHeaders;
|
||||
|
||||
void GenerateAuxiliaryVector_x86_32(Memory::VirtualMemoryArea *vma,
|
||||
FileNode *fd, Elf32_Ehdr ELFHeader,
|
||||
uint32_t EntryPoint,
|
||||
uint32_t BaseAddress);
|
||||
|
||||
void GenerateAuxiliaryVector_x86_64(Memory::VirtualMemoryArea *vma,
|
||||
void GenerateAuxiliaryVector(Memory::VirtualMemoryArea *vma,
|
||||
FileNode *fd, Elf64_Ehdr ELFHeader,
|
||||
uint64_t EntryPoint,
|
||||
uint64_t BaseAddress);
|
||||
uintptr_t EntryPoint,
|
||||
uintptr_t BaseAddress);
|
||||
|
||||
void LoadExec_x86_32(FileNode *fd, Tasking::PCB *TargetProcess);
|
||||
void LoadExec_x86_64(FileNode *fd, Tasking::PCB *TargetProcess);
|
||||
void LoadDyn_x86_32(FileNode *fd, Tasking::PCB *TargetProcess);
|
||||
void LoadDyn_x86_64(FileNode *fd, Tasking::PCB *TargetProcess);
|
||||
void LoadSegments(FileNode *fd, Tasking::PCB *TargetProcess, Elf_Ehdr &ELFHeader, uintptr_t &BaseAddress);
|
||||
|
||||
void LoadExec(FileNode *fd, Tasking::PCB *TargetProcess);
|
||||
void LoadDyn(FileNode *fd, Tasking::PCB *TargetProcess);
|
||||
bool LoadInterpreter(FileNode *fd, Tasking::PCB *TargetProcess);
|
||||
|
||||
public:
|
||||
|
Loading…
x
Reference in New Issue
Block a user