From 4014a36377ff69f6433e7b0af2144bc3a7d29ca7 Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Thu, 16 Apr 2020 19:06:33 +0200 Subject: Many fix attempts for the divide by zero exception --- src/kernel/fs/elf.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/kernel/fs/elf.c') diff --git a/src/kernel/fs/elf.c b/src/kernel/fs/elf.c index b6d90c9..493bdac 100644 --- a/src/kernel/fs/elf.c +++ b/src/kernel/fs/elf.c @@ -40,16 +40,16 @@ uint32_t load_elf(char *elf_data) v_begin = p_entry->vaddr; v_end = p_entry->vaddr + p_entry->memsz; if (v_begin < USER_OFFSET) { - warn("load_elf(): can't load executable below %x\n", USER_OFFSET); + warn("load_elf(): can't load executable below %x", USER_OFFSET); return 0; } if (v_end > USER_STACK) { - warn("load_elf(): can't load executable above %x\n", USER_STACK); + warn("load_elf(): can't load executable above %x", USER_STACK); return 0; } - printf("ELF: entry flags: %x (%d)\n", p_entry->flags, p_entry->flags); + log("ELF: entry flags: %x (%d)", p_entry->flags, p_entry->flags); memcpy((uint8_t *)v_begin, (uint8_t *)(elf_data + p_entry->offset), p_entry->filesz); @@ -63,4 +63,4 @@ uint32_t load_elf(char *elf_data) } return hdr->entry; -} \ No newline at end of file +} -- cgit v1.2.3