ciabatta/src/loader/loader.c

20 lines
356 B
C
Raw Normal View History

2023-08-03 13:16:15 +00:00
#include <cia-def.h>
#include <bin/elf.h>
2023-08-03 18:36:03 +00:00
#include <sys/syscall.h>
struct Elf_Image typedef Elf_Image;
struct Elf_Image {
u8 *base;
u8 *phdr;
u64 ph_num;
u64 ph_ent;
char *name;
};
2023-08-03 13:16:15 +00:00
2023-08-03 17:17:41 +00:00
void loader_entry(u64 *sp, u64 *dynv, u64 *aux) {
2023-08-03 13:16:15 +00:00
char str[] = "Hello world??\n";
2023-08-03 18:36:03 +00:00
sys_write(STDOUT_FILENO, str, sizeof str);
sys_exit(0);
2023-08-03 13:16:15 +00:00
}