1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-28 17:35:08 +00:00

Okay, with some mucking around, there is now a /bin/id and it runs!

It statically links against everything in LibC that it needs.
This will work just fine for a long time to come!
This commit is contained in:
Andreas Kling 2018-10-22 14:41:54 +02:00
parent 38a621c721
commit befeabd8fe
4 changed files with 11 additions and 12 deletions

View file

@ -150,14 +150,14 @@ static void init_stage2()
#ifdef TEST_ELF_LOADER
{
auto testExecutable = vfs->open("/_test.o");
auto testExecutable = vfs->open("/bin/id");
ASSERT(testExecutable);
auto testExecutableData = testExecutable->readEntireFile();
ASSERT(testExecutableData);
ExecSpace space;
space.loadELF(move(testExecutableData));
auto* elf_entry = space.symbolPtr("elf_entry");
auto* elf_entry = space.symbolPtr("_start");
ASSERT(elf_entry);
typedef int (*MainFunctionPtr)(void);