elf_map: why offset of vma need to subtract eppnt->p_vaddr ?

Jacky jackyclivia at 163.com
Fri Mar 29 03:15:11 EDT 2013


 Hi All,

When mmaping elf image into memory, why offset vma need to subtract eppnt->p_vaddr as the following code ?

static unsigned long elf_map()
{
    ...
    unsigned long off = eppnt->p_offset - ELF_PAGEOFFSET(eppnt->p_vaddr);
    ...
}

Thanks in advance.

Jacky



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20130329/c193e60d/attachment.html 


More information about the Kernelnewbies mailing list