* process page map
@ 2014-04-05 21:33 gary kong
0 siblings, 0 replies; 2+ messages in thread
From: gary kong @ 2014-04-05 21:33 UTC (permalink / raw)
To: kernelnewbies
I am looking at the /proc/self/maps file. i find that for every shared
library there are 4 sections with different permission. what are the
reasons for this ? does that mean the same library is loaded 4 times ?
e.g.
7fb543e5d000-7fb54401a000 r-xp 00000000 08:01 6033115
/lib/x86_64-linux-gnu/libc-2.17.so
7fb54401a000-7fb54421a000 ---p 001bd000 08:01 6033115
/lib/x86_64-linux-gnu/libc-2.17.so
7fb54421a000-7fb54421e000 r--p 001bd000 08:01 6033115
/lib/x86_64-linux-gnu/libc-2.17.so
7fb54421e000-7fb544220000 rw-p 001c1000 08:01 6033115
/lib/x86_64-linux-gnu/libc-2.17.so
7fb544220000-7fb544225000 rw-p 00000000 00:00 0
7fb544225000-7fb54423a000 r-xp 00000000 08:01 6029447
/lib/x86_64-linux-gnu/libgcc_s.so.1
7fb54423a000-7fb544439000 ---p 00015000 08:01 6029447
/lib/x86_64-linux-gnu/libgcc_s.so.1
7fb544439000-7fb54443a000 r--p 00014000 08:01 6029447
/lib/x86_64-linux-gnu/libgcc_s.so.1
7fb54443a000-7fb54443b000 rw-p 00015000 08:01 6029447
/lib/x86_64-linux-gnu/libgcc_s.so.1
7fb54443b000-7fb54453e000 r-xp 00000000 08:01 6032973
/lib/x86_64-linux-gnu/libm-2.17.so
7fb54453e000-7fb54473d000 ---p 00103000 08:01 6032973
/lib/x86_64-linux-gnu/libm-2.17.so
7fb54473d000-7fb54473e000 r--p 00102000 08:01 6032973
/lib/x86_64-linux-gnu/libm-2.17.so
7fb54473e000-7fb54473f000 rw-p 00103000 08:01 6032973
/lib/x86_64-linux-gnu/libm-2.17.so
Gary
^ permalink raw reply [flat|nested] 2+ messages in thread
* process page map
@ 2014-04-09 8:27 Mark Einon
0 siblings, 0 replies; 2+ messages in thread
From: Mark Einon @ 2014-04-09 8:27 UTC (permalink / raw)
To: kernelnewbies
On Sat Apr 5 17:33:23 EDT 2014, gary kong wrote:
> I am looking at the /proc/self/maps file. i find that for every shared
> library there are 4 sections with different permission. what are the
> reasons for this ? does that mean the same library is loaded 4 times ?
> e.g.
>
>
> 7fb543e5d000-7fb54401a000 r-xp 00000000 08:01 6033115
> /lib/x86_64-linux-gnu/libc-2.17.so
> 7fb54401a000-7fb54421a000 ---p 001bd000 08:01 6033115
> /lib/x86_64-linux-gnu/libc-2.17.so
> 7fb54421a000-7fb54421e000 r--p 001bd000 08:01 6033115
> /lib/x86_64-linux-gnu/libc-2.17.so
> 7fb54421e000-7fb544220000 rw-p 001c1000 08:01 6033115
> /lib/x86_64-linux-gnu/libc-2.17.so
> 7fb544220000-7fb544225000 rw-p 00000000 00:00 0
> 7fb544225000-7fb54423a000 r-xp 00000000 08:01 6029447
> /lib/x86_64-linux-gnu/libgcc_s.so.1
> 7fb54423a000-7fb544439000 ---p 00015000 08:01 6029447
> /lib/x86_64-linux-gnu/libgcc_s.so.1
> 7fb544439000-7fb54443a000 r--p 00014000 08:01 6029447
> /lib/x86_64-linux-gnu/libgcc_s.so.1
> 7fb54443a000-7fb54443b000 rw-p 00015000 08:01 6029447
> /lib/x86_64-linux-gnu/libgcc_s.so.1
> 7fb54443b000-7fb54453e000 r-xp 00000000 08:01 6032973
> /lib/x86_64-linux-gnu/libm-2.17.so
> 7fb54453e000-7fb54473d000 ---p 00103000 08:01 6032973
> /lib/x86_64-linux-gnu/libm-2.17.so
> 7fb54473d000-7fb54473e000 r--p 00102000 08:01 6032973
> /lib/x86_64-linux-gnu/libm-2.17.so
> 7fb54473e000-7fb54473f000 rw-p 00103000 08:01 6032973
> /lib/x86_64-linux-gnu/libm-2.17.so
>
> Gary
Hi Gary,
My details below may be a bit sketchy but it means that each library is made up
of four parts -
* The read ony executable part (r-xp) is the text section, containing the
executable code.
* The no permissions (---p) part is (probably...?) kernel specific (something to
do with faster syscalls?).
* The read only non-executable part (r--p) is the data segment for static, read
only data and the bss.
* The read write part (rw-p) is for dynamic data that the library uses.
The 'pmap' command gives this info in a slightly easier to read way.
Hope that helps,
Mark
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-04-09 8:27 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-05 21:33 process page map gary kong
-- strict thread matches above, loose matches on Subject: below --
2014-04-09 8:27 Mark Einon
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).