Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 20 Feb 2002 05:32:28 -0600 (CST)
From:      Haryadi Gunawi <haryadi@cs.wisc.edu>
To:        freebsd-questions@freebsd.org
Subject:   /proc/pid/map (freeBSD vs Linux)
Message-ID:  <Pine.GSO.4.21.0202200526230.10950-100000@nova11.cs.wisc.edu>

next in thread | raw e-mail | index | archive | help

Hi,

can someone help me explain what each column represents in /proc/pid/map?

Here I just ran a simple program that use c library, the /proc/pid/map
contains (in FreeBSD):

0x8048000 0x8049000 1 0 0xc8776d20 r-x 2 0 0x0 COW NC vnode
0x8049000 0x804a000 1 0 0xc88f3ba0 rw- 2 0 0x2180 NCOW NNC default
0x804a000 0x804c000 2 0 0xc88f3ba0 rwx 2 0 0x2180 NCOW NNC default
0x28049000 0x2805a000 12 0 0xc03f9f80 r-x 73 34 0x0 COW NC vnode
0x2805a000 0x2805b000 1 0 0xc8806120 rw- 1 0 0x2180 COW NNC vnode
0x2805b000 0x2805d000 2 0 0xc884f2a0 rw- 2 0 0x2180 NCOW NNC default
0x2805d000 0x28065000 6 0 0xc884f2a0 rwx 2 0 0x2180 NCOW NNC default
0x28065000 0x280e5000 57 0 0xc03fad60 r-x 73 34 0x0 COW NC vnode
0x280e5000 0x280ea000 5 0 0xc885b840 rwx 1 0 0x2180 COW NNC vnode
0x280ea000 0x280fe000 3 0 0xc8725de0 rwx 1 0 0x2180 NCOW NNC default
0xbfbe0000 0xbfc00000 4 0 0xc873dcc0 rwx 1 0 0x2180 NCOW NNC default


while in LINUX, the proc/pid/maps contains:

8048000-08049000 r-xp 00000000 03:08 22408      /rdata/src/test/loop/a.out
08049000-0804a000 rw-p 00000000 03:08 22408     /rdata/src/test/loop/a.out
40000000-40016000 r-xp 00000000 03:08 44178      /lib/ld-2.1.92.so
40016000-40017000 rw-p 00015000 03:08 44178      /lib/ld-2.1.92.so
40017000-40019000 rw-p 00000000 00:00 0
40022000-4013d000 r-xp 00000000 03:08 44185      /lib/libc-2.1.92.so
4013d000-40143000 rw-p 0011a000 03:08 44185      /lib/libc-2.1.92.so
40143000-40147000 rw-p 00000000 00:00 0
bfffe000-c0000000 rwxp fffff000 00:00 0


-----

the problem is I must know what dynamic-linked libraries are used in a
program. In Linux, it's pretty straightforward (i.e. this program uses
libc-2.1.92.so). But how do I know what libraries are used in
freeBSD. Should I look somewhere else instead /proc/pid/map?

try to get the answer in the Internet, but haven't got one.

thank you very much in advance
hg


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.GSO.4.21.0202200526230.10950-100000>