mirror of
https://github.com/EnderIce2/Fennix.git
synced 2025-06-01 01:07:58 +00:00
TODO
This commit is contained in:
parent
f07c10a2ee
commit
98d58cf655
@ -15,6 +15,7 @@ using namespace Tasking;
|
||||
namespace Execute
|
||||
{
|
||||
void ELFLoadExec(void *BaseImage,
|
||||
size_t Length,
|
||||
Elf64_Ehdr *ELFHeader,
|
||||
Memory::Virtual &pva,
|
||||
SpawnData *ret,
|
||||
@ -139,6 +140,14 @@ namespace Execute
|
||||
UNUSED(SymbolTable);
|
||||
UNUSED(RelaPlt);
|
||||
|
||||
char *NeededLibraries[256];
|
||||
uint64_t InitAddress = 0;
|
||||
uint64_t FiniAddress = 0;
|
||||
|
||||
UNUSED(NeededLibraries);
|
||||
UNUSED(InitAddress);
|
||||
UNUSED(FiniAddress);
|
||||
|
||||
if (!DynamicString)
|
||||
DynamicString = StringTable;
|
||||
|
||||
@ -172,10 +181,6 @@ namespace Execute
|
||||
|
||||
Elf64_Dyn *Dynamic = (Elf64_Dyn *)((uint8_t *)BaseImage + ItrProgramHeader.p_offset);
|
||||
|
||||
char *NeededLibraries[256];
|
||||
uint64_t InitAddress = 0;
|
||||
uint64_t FiniAddress = 0;
|
||||
|
||||
for (uint64_t i = 0; i < ItrProgramHeader.p_filesz / sizeof(Elf64_Dyn); i++)
|
||||
{
|
||||
switch (Dynamic[i].d_tag)
|
||||
@ -376,11 +381,15 @@ namespace Execute
|
||||
FileSystem::FILE *InterpreterFile = vfs->Open(InterpreterPath);
|
||||
if (InterpreterFile->Status != FileSystem::FileStatus::OK)
|
||||
{
|
||||
error("Failed to open interpreter file: %s", InterpreterPath);
|
||||
warn("Failed to open interpreter file: %s", InterpreterPath);
|
||||
}
|
||||
else
|
||||
{
|
||||
// TODO: Load interpreter file
|
||||
fixme("Interpreter file loaded: %s", InterpreterPath);
|
||||
}
|
||||
vfs->Close(InterpreterFile);
|
||||
|
||||
break;
|
||||
}
|
||||
/* ... */
|
||||
|
@ -19,6 +19,7 @@ namespace Execute
|
||||
SpawnData ret = {.Status = ExStatus::Unknown,
|
||||
.Process = nullptr,
|
||||
.Thread = nullptr};
|
||||
|
||||
FileSystem::FILE *ExFile = vfs->Open(Path);
|
||||
if (ExFile->Status == FileSystem::FileStatus::OK)
|
||||
{
|
||||
@ -121,7 +122,7 @@ namespace Execute
|
||||
|
||||
if (ELFHeader->e_type == ET_EXEC)
|
||||
{
|
||||
ELFLoadExec(BaseImage, ELFHeader, pva, &ret, Path, Process, argv, envp, Arch, Comp);
|
||||
ELFLoadExec(BaseImage, ExFile->Node->Length, ELFHeader, pva, &ret, Path, Process, argv, envp, Arch, Comp);
|
||||
goto Exit;
|
||||
}
|
||||
else if (ELFHeader->e_type == ET_DYN)
|
||||
|
@ -43,8 +43,8 @@ namespace Execute
|
||||
SpawnData Spawn(char *Path, const char **argv, const char **envp);
|
||||
|
||||
void *ELFLoadRel(Elf64_Ehdr *Header);
|
||||
|
||||
void ELFLoadExec(void *BaseImage,
|
||||
size_t Length,
|
||||
Elf64_Ehdr *ELFHeader,
|
||||
Memory::Virtual &pva,
|
||||
SpawnData *ret,
|
||||
|
Loading…
x
Reference in New Issue
Block a user