Skip to content
Snippets Groups Projects
Commit 4c274cef authored by Austin Clements's avatar Austin Clements
Browse files

Simplify boot loader by removing some JOS'isms

parent faad047a
No related branches found
No related tags found
No related merge requests found
......@@ -34,7 +34,7 @@ bootmain(void)
ph = (struct proghdr*)((uchar*)elf + elf->phoff);
eph = ph + elf->phnum;
for(; ph < eph; ph++) {
va = (uchar*)(ph->va & 0xFFFFFF);
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();
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment