From e85a68e1536a0f6505300e1cb79f06b9743b00f7 Mon Sep 17 00:00:00 2001 From: Miguel Date: Sun, 9 Sep 2018 11:49:30 +0200 Subject: fixing implicit func declarations! --- fs/elf.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'fs/elf.c') diff --git a/fs/elf.c b/fs/elf.c index 1a6fa89..bca527a 100644 --- a/fs/elf.c +++ b/fs/elf.c @@ -1,6 +1,7 @@ #include "kernel/kernel.h" #include #include "ext2.h" +#include "lib/string/string.h" #define EI_NIDENT 16 @@ -149,14 +150,14 @@ uint32_t load_elf(char *name, uint32_t *alloc) //uint8_t *data=vaddr+phdr->p_offset; uint8_t *data=vaddr+phdr->p_offset+phdr->p_filesz-1; - for(uint8_t *addr=phdr->p_vaddr+phdr->p_filesz-1; addr>=phdr->p_vaddr; addr--) + for(uint8_t *addr=phdr->p_vaddr+phdr->p_filesz-1; (uint32_t)addr>=phdr->p_vaddr; addr--) { *addr=*data; data--; } // let's zero init bss and set alloc (heap) just right after it! - for(uint8_t *addr=phdr->p_vaddr+phdr->p_filesz; addr<=phdr->p_vaddr+phdr->p_memsz; addr++) + for(uint8_t *addr=phdr->p_vaddr+phdr->p_filesz; (uint32_t)addr<=phdr->p_vaddr+phdr->p_memsz; addr++) { *addr=0; } -- cgit v1.2.3