mirror of
https://github.com/tailix/kernel.git
synced 2025-02-17 15:45:37 -05:00
Fix ELF entrypoint
This commit is contained in:
parent
ca9564b8c5
commit
a734782062
1 changed files with 4 additions and 1 deletions
|
@ -48,7 +48,10 @@ void init(const struct KernelMQ_Info *const kinfo_ptr)
|
|||
elf_header->header_size == 52;
|
||||
|
||||
if (is_elf_header_valid) {
|
||||
tasks_switch_to_user(elf_header->entrypoint);
|
||||
const unsigned long real_entrypoint =
|
||||
kinfo.modules[0].base + elf_header->entrypoint;
|
||||
|
||||
tasks_switch_to_user(real_entrypoint);
|
||||
}
|
||||
else {
|
||||
logger_warn_from("init", "Invalid ELF header");
|
||||
|
|
Loading…
Add table
Reference in a new issue