How to match /proc/#/map entries to the library/executable file name

Yuri yuri at
Mon Oct 22 13:56:08 PDT 2007


I need to find the file name for every /proc/#/map entry for a program linked
But some of them end with '-'.
Where can I find documentation describing /pcor/#/map file format, explaining
why these dashes are there?

And how to find the corresponding filenames?

I found a method based on 'dladdr' function. But this seems to only work when
dynamic libraries are enabled.

Here is /proc/<FD>/map file:

0x38000000 0x38193000 403 0 0xc656dc60 r-x 1 0 0x0 COW NC vnode
0x38193000 0x38c61000 7 0 0xc6a8dbdc rw- 1 0 0x2180 NCOW NNC default -
0xbfbe0000 0xbfc00000 2 0 0xc67506b4 rwx 1 0 0x2180 NCOW NNC default -


More information about the freebsd-questions mailing list