1
0
Fork 0
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:
Alex Kotov 2020-11-25 18:38:00 +05:00
parent ca9564b8c5
commit a734782062
Signed by: kotovalexarian
GPG key ID: 553C0EBBEB5D5F08

View file

@ -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");