Re: VMAs and "offset"s?

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

 



On Tue, 8 Apr 2008, Peter Kerpedjiev wrote:

> Robert P. J. Day wrote:
> > # pmap -d 1
> > 1:   init [5]
> > Address   Kbytes Mode  Offset           Device    Mapping
> > ... snip ...
> > 00c55000      12 r-x-- 0000000000000000 0fd:00000 libdl-2.7.so
> > 00c58000       4 r-x-- 0000000000002000 0fd:00000 libdl-2.7.so
> > 00c59000       4 rwx-- 0000000000003000 0fd:00000 libdl-2.7.so
> > ...
> >
> > if you look at the second VMA for that shared lib, its address shows
> > that it's 0x3000 higher up in memory, but the Offset field shows an
> > offset of only 0x2000.  what does that mean?  thanks.
> >
> >
> AFAICT, the region from offset 2000 to offset 3000 in libdl-2.7.so
> is mapped by both of the first two memory areas.
>
> I'm not sure why two memory regions would map the same part of a
> file with the same permissions.

that's what was confusing me, since i read in love's book, p. 256:

"Intervals in different memory areas in the same address space cannot
overlap."

and that sure looks like overlapping to me, but only if you take the
"offset" field seriously.

rday
--

========================================================================
Robert P. J. Day
Linux Consulting, Training and Annoying Kernel Pedantry:
    Have classroom, will lecture.

http://crashcourse.ca                          Waterloo, Ontario, CANADA
========================================================================

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux