diff options
author | Frans Kaashoek <[email protected]> | 2011-07-27 20:49:45 -0400 |
---|---|---|
committer | Frans Kaashoek <[email protected]> | 2011-07-27 20:49:45 -0400 |
commit | dccb915282854476ce47752df6631dcce3b8f661 (patch) | |
tree | a84aa8ed35618f99c3d7e8cdd466d22ae7bad597 /bootmain.c | |
parent | 9acdfe0d04f3fcf95c6e392e08afb45bdfe16c20 (diff) | |
parent | 13a96baefc0ff5d8262c4bc8c797bee4b157443c (diff) | |
download | xv6-labs-dccb915282854476ce47752df6631dcce3b8f661.tar.gz xv6-labs-dccb915282854476ce47752df6631dcce3b8f661.tar.bz2 xv6-labs-dccb915282854476ce47752df6631dcce3b8f661.zip |
Merge commit 'origin/master' into page
Diffstat (limited to 'bootmain.c')
-rw-r--r-- | bootmain.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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(); } |