Hi all,
I'm looking at a memory map printed by gdb. While most of the output seems intuitive, there are some things which are not directly obvious. I read through the manual for gdb and didn't see this output addressed so maybe it's generating it by invoking something else.
Here are my guesses, let me know if I am even close to being correct:
1) Each line corresponds to an area of memory.
2) The first lines with small addresses are virtual memory and the later lines with longer addresses are physical addresses? This would put the heap in the correct location but not program text:
http://web.sfc.keio.ac.jp/~rdv/keio/sfc/teaching/system-software/system-software-2008-prod/ncsu-linux_memory_map.png
3) The first two fields define the range of the area.
4) The next field has four bits, rwxp, standing for read, write, executable, and perhaps "paged".
5) The next field != f2-f1 so it isn't the size of the region. I don't know what it is.
6) The next field looks like it could be a time but I have no clue.
7) The next field is decimal and apparently also not the size of the region. I don't know what it is.
8) The next field is the corresponding object on disk.
9) Also, there are various unlabelled lines of a similar form:
7f1b13c1d000-7f1b13c2f000 rwxp 7f1b13c1d000 00:00 0 |
What are these?
10) A lot of the libraries seem to have four "copies" loaded, one which can't be accessed, one that is rx, one that is rw, and one that is r only. Why?
Best regards,
Craig
======= Memory map: ========
00400000-00693000 r-xp 00000000 00:24 138461511 /h1/craig/Desktop/MolSurf/bin/MolSurf
00892000-00893000 r--p 00292000 00:24 138461511 /h1/craig/Desktop/MolSurf/bin/MolSurf
00893000-00899000 rw-p 00293000 00:24 138461511 /h1/craig/Desktop/MolSurf/bin/MolSurf
00899000-0089c000 rw-p 00899000 00:00 0
01f49000-02250000 rw-p 01f49000 00:00 0 [heap]
41ab3000-41ab5000 rwxp 00000000 00:0f 1714 /dev/zero
7f1ad4000000-7f1ad4021000 rw-p 7f1ad4000000 00:00 0
7f1ad4021000-7f1ad8000000 ---p 7f1ad4021000 00:00 0
7f1ada8c2000-7f1adb451000 rw-p 7f1ada8c2000 00:00 0
7f1add68a000-7f1b04c0d000 rw-p 7f1add68a000 00:00 0
7f1b0576b000-7f1b090de000 rw-p 7f1b0576b000 00:00 0
7f1b0b2fa000-7f1b0c9fb000 rw-p 7f1b0b2fa000 00:00 0
7f1b0ec34000-7f1b0f7c3000 rw-p 7f1b0ec34000 00:00 0
7f1b1185c000-7f1b118bd000 rw-p 7f1b1185c000 00:00 0
7f1b118ee000-7f1b119fc000 rw-p 7f1b118ee000 00:00 0
7f1b119fc000-7f1b11a01000 r-xp 00000000 08:01 960330 /usr/lib/libXdmcp.so.6.0.0
7f1b11a01000-7f1b11c00000 ---p 00005000 08:01 960330 /usr/lib/libXdmcp.so.6.0.0
7f1b11c00000-7f1b11c01000 rw-p 00004000 08:01 960330 /usr/lib/libXdmcp.so.6.0.0
7f1b11c01000-7f1b11c1c000 r-xp 00000000 08:01 318937 /usr/lib/libxcb.so.1.1.0
7f1b11c1c000-7f1b11e1b000 ---p 0001b000 08:01 318937 /usr/lib/libxcb.so.1.1.0
7f1b11e1b000-7f1b11e1c000 r--p 0001a000 08:01 318937 /usr/lib/libxcb.so.1.1.0
7f1b11e1c000-7f1b11e1d000 rw-p 0001b000 08:01 318937 /usr/lib/libxcb.so.1.1.0
7f1b11e1d000-7f1b11e1f000 r-xp 00000000 08:01 960328 /usr/lib/libXau.so.6.0.0
7f1b11e1f000-7f1b1201e000 ---p 00002000 08:01 960328 /usr/lib/libXau.so.6.0.0
7f1b1201e000-7f1b1201f000 r--p 00001000 08:01 960328 /usr/lib/libXau.so.6.0.0
7f1b1201f000-7f1b12020000 rw-p 00002000 08:01 960328 /usr/lib/libXau.so.6.0.0
7f1b12020000-7f1b12027000 r-xp 00000000 08:01 646907 /lib/librt-2.9.so
7f1b12027000-7f1b12226000 ---p 00007000 08:01 646907 /lib/librt-2.9.so
7f1b12226000-7f1b12227000 r--p 00006000 08:01 646907 /lib/librt-2.9.so
7f1b12227000-7f1b12228000 rw-p 00007000 08:01 646907 /lib/librt-2.9.so
7f1b12228000-7f1b1222a000 r-xp 00000000 08:01 646893 /lib/libdl-2.9.so
7f1b1222a000-7f1b1242a000 ---p 00002000 08:01 646893 /lib/libdl-2.9.so
7f1b1242a000-7f1b1242b000 r--p 00002000 08:01 646893 /lib/libdl-2.9.so
7f1b1242b000-7f1b1242c000 rw-p 00003000 08:01 646893 /lib/libdl-2.9.so
7f1b1242c000-7f1b1252e000 r-xp 00000000 08:01 960334 /usr/lib/libX11.so.6.2.0
7f1b1252e000-7f1b1272e000 ---p 00102000 08:01 960334 /usr/lib/libX11.so.6.2.0
7f1b1272e000-7f1b1272f000 r--p 00102000 08:01 960334 /usr/lib/libX11.so.6.2.0
7f1b1272f000-7f1b12733000 rw-p 00103000 08:01 960334 /usr/lib/libX11.so.6.2.0
7f1b12733000-7f1b12744000 r-xp 00000000 08:01 960336 /usr/lib/libXext.so.6.4.0
7f1b12744000-7f1b12943000 ---p 00011000 08:01 960336 /usr/lib/libXext.so.6.4.0
7f1b12943000-7f1b12944000 r--p 00010000 08:01 960336 /usr/lib/libXext.so.6.4.0
7f1b12944000-7f1b12945000 rw-p 00011000 08:01 960336 /usr/lib/libXext.so.6.4.0
7f1b12945000-7f1b136e7000 r-xp 00000000 08:01 335377 /usr/lib/libGLcore.so.180.44
7f1b136e7000-7f1b137e6000 ---p 00da2000 08:01 335377 /usr/lib/libGLcore.so.180.44
7f1b137e6000-7f1b13c1d000 rwxp 00da1000 08:01 335377 /usr/lib/libGLcore.so.180.44
7f1b13c1d000-7f1b13c2f000 rwxp 7f1b13c1d000 00:00 0
7f1b13c2f000-7f1b13d09000 r-xp 00000000 08:01 319921 /usr/lib/libgfortran.so.3.0.0
7f1b13d09000-7f1b13f08000 ---p 000da000 08:01 319921 /usr/lib/libgfortran.so.3.0.0
7f1b13f08000-7f1b13f09000 r--p 000d9000 08:01 319921 /usr/lib/libgfortran.so.3.0.0
7f1b13f09000-7f1b13f0a000 rw-p 000da000 08:01 319921 /usr/lib/libgfortran.so.3.0.0
7f1b13f0a000-7f1b13f0b000 rw-p 7f1b13f0a000 00:00 0
7f1b13f0b000-7f1b13f1e000 r-xp 00000000 00:26 2361514 /org/centers/cvc/software/share/usr.linux.x86_64/lib/boost-1.41.0/libboost_thread-mt.so.1.41.0
7f1b13f1e000-7f1b1411d000 ---p 00013000 00:26 2361514 /org/centers/cvc/software/share/usr.linux.x86_64/lib/boost-1.41.0/libboost_thread-mt.so.1.41.0
7f1b1411d000-7f1b1411f000 r--p 00012000 00:26 2361514 /org/centers/cvc/software/share/usr.linux.x86_64/lib/boost-1.41.0/libboost_thread-mt.so.1.41.0
7f1b1411f000-7f1b14120000 rw-p 00014000 00:26 2361514 /org/centers/cvc/software/share/usr.linux.x86_64/lib/boost-1.41.0/libboost_thread-mt.so.1.41.0
...
7f1b1598f000-7f1b15a80000 r-xp 00000000 08:01 957966 /usr/lib/libstdc++.so.6.0.10
7f1b15a80000-7f1b15c80000 ---p 000f1000 08:01 957966 /usr/lib/libstdc++.so.6
|