Make elf proghdr fields match what objdump prints
This commit is contained in:
parent
5f069dcf2f
commit
fa81545f1c
3 changed files with 7 additions and 7 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue