From owner-freebsd-questions Wed Feb 20 3:32:36 2002 Delivered-To: freebsd-questions@freebsd.org Received: from claven.cs.wisc.edu (claven.cs.wisc.edu [128.105.6.18]) by hub.freebsd.org (Postfix) with ESMTP id A92CC37B404 for ; Wed, 20 Feb 2002 03:32:30 -0800 (PST) Received: from nova11.cs.wisc.edu (nova11.cs.wisc.edu [128.105.119.111]) by claven.cs.wisc.edu (8.9.2/8.9.2) with ESMTP id FAA29633 for ; Wed, 20 Feb 2002 05:32:28 -0600 (CST) Received: from localhost (haryadi@localhost) by nova11.cs.wisc.edu (8.9.2/8.9.2) with ESMTP id FAA10971 for ; Wed, 20 Feb 2002 05:32:28 -0600 (CST) X-Authentication-Warning: nova11.cs.wisc.edu: haryadi owned process doing -bs Date: Wed, 20 Feb 2002 05:32:28 -0600 (CST) From: Haryadi Gunawi To: freebsd-questions@freebsd.org Subject: /proc/pid/map (freeBSD vs Linux) Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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