Great ! Thanks Prabhunath.
Let me make sure I understand you correctly:
Substracting ELF_PAGEOFFSET(eppnt->p_vaddr) from variable off makes vma map
the page-aligned file contents, right ?
在 2013-03-29 16:56:29,"Prabhu nath" 写道:
On Fri, Mar 29, 2013 at 12:45 PM, Jacky wrote:
Hi All,
W
On Fri, Mar 29, 2013 at 3:03 PM, Jacky wrote:
>
> Great ! Thanks Prabhunath.
>
> Let me make sure I understand you correctly:
>
> Substracting ELF_PAGEOFFSET(eppnt->p_vaddr) from variable off makes vma
> map the page-aligned file contents, right ?
>
Small change : Substracting ELF_PAGEOFFSET(e
On Fri, Mar 29, 2013 at 12:45 PM, Jacky wrote:
> 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);
>
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
_