summaryrefslogtreecommitdiff
path: root/fs/elf.c
diff options
context:
space:
mode:
authorMiguel <m.i@gmx.at>2018-09-09 11:49:30 +0200
committerMiguel <m.i@gmx.at>2018-09-09 11:49:30 +0200
commite85a68e1536a0f6505300e1cb79f06b9743b00f7 (patch)
treec503a7681720925c5f4923e26c01f7b2e697023d /fs/elf.c
parentfc1d491479abd74a1e038ad9ff7d4d330d79e4a8 (diff)
fixing implicit func declarations!
Diffstat (limited to 'fs/elf.c')
-rw-r--r--fs/elf.c5
1 files changed, 3 insertions, 2 deletions
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 <stdint.h>
#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;
}