summaryrefslogtreecommitdiff
path: root/bootmain.c
diff options
context:
space:
mode:
Diffstat (limited to 'bootmain.c')
-rw-r--r--bootmain.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/bootmain.c b/bootmain.c
index fa2725d..c2d6050 100644
--- a/bootmain.c
+++ b/bootmain.c
@@ -35,8 +35,8 @@ bootmain(void)
ph = (struct proghdr*)((uchar*)elf + elf->phoff);
eph = ph + elf->phnum;
for(; ph < eph; ph++){
- pa = (uchar*)ph->pa;
- readseg(pa, ph->filesz, ph->offset);
+ pa = (uchar*)ph->paddr;
+ readseg(pa, ph->filesz, ph->off);
if(ph->memsz > ph->filesz)
stosb(pa + ph->filesz, 0, ph->memsz - ph->filesz);
}