summaryrefslogtreecommitdiff
path: root/bootmain.c
diff options
context:
space:
mode:
Diffstat (limited to 'bootmain.c')
-rw-r--r--bootmain.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/bootmain.c b/bootmain.c
index 14f4ff3..7cd469f 100644
--- a/bootmain.c
+++ b/bootmain.c
@@ -33,8 +33,8 @@ bootmain(void)
// Load each program segment (ignores ph flags).
ph = (struct proghdr*)((uchar*)elf + elf->phoff);
eph = ph + elf->phnum;
- for(; ph < eph; ph++) {
- va = (uchar*)(ph->va & 0xFFFFFF);
+ for(; ph < eph; ph++){
+ va = (uchar*)ph->va;
readseg(va, ph->filesz, ph->offset);
if(ph->memsz > ph->filesz)
stosb(va + ph->filesz, 0, ph->memsz - ph->filesz);
@@ -42,7 +42,7 @@ bootmain(void)
// Call the entry point from the ELF header.
// Does not return!
- entry = (void(*)(void))(elf->entry & 0xFFFFFF);
+ entry = (void(*)(void))(elf->entry);
entry();
}