[Prev][Next][Index][Thread]

Re: elf loader is broken




> The elf standard says that elf executables must be extracted to the
> physical load address, not the virtual memory address. This is not
> done in oskit/exec/elf.c--at least in the version released on March
> 17, 2002; I have attached a patch.

I am not so sure about this - isn't the p_paddr relevant only if direct
physical addressing is used (and there are no holes in physical memory)?
The loading and linking has to be architecture and OS specific?

IA32 provides the option of not using virtual memory (i.e. the page
tables), since protection can be achieved by using segmentation. Some
OSkit components happen to use page tables, but seem to perform a direct
mapping. So using p_vaddr or p_paddr might work the same way.

I think that if you use non-direct page table mapping (for protection or
for virtual memory i.e. swapping) then you would need to use p_vaddr.

--suresh



References: