I am using an embedded development board with a mips 4kEC on it. I use buildroot for building a
rootfs and the toolchain.
I cross compiled a helloword app.
When I look at the output of pmap I see the following
/helloworldmips(86)
00400000 (4 KB) r-xp (00:0a 33243002) linux/test/helloworldmips
10000000 (4 KB) rw-p (00:0a 33243002) linux/test/helloworldmips
10001000 (4 KB) rwxp (00:00 0) [heap]
2aaa8000 (20 KB) r-xp (00:07 1795853) /lib/ld-uClibc-0.9.27.so
2aaad000 (4 KB) rw-p (00:00 0)
2aaed000 (4 KB) rw-p (00:07 1795853) /lib/ld- uClibc-0.9.27.so
2aaee000 (48 KB) r-xp (00:07 1795861) /lib/libgcc_s.so.1
2aafa000 (252 KB) ---p (00:00 0)
2ab39000 (4 KB) rw-p (00:07 1795861) /lib/libgcc_s.so.1
2ab3a000 (368 KB) r-xp (00:07 1795855) /lib/libuClibc-0.9.27.so
2ab96000 (256 KB) ---p (00:00 0)
2abd6000 (8 KB) rw-p (00:07 1795855) /lib/libuClibc- 0.9.27.so
2abd8000 (16 KB) rw-p (00:00 0)
7fd49000 (84 KB) rwxp (00:00 0) [stack]
mapped: 1076 KB writable/private: 128 KB shared: 0 KB
It seems that the bss segments of the shared libs are protected and mapped to the zero page. I don't see this
when I run this on a linux pc. I have the following questions:
- Why is this segment protected? Accessing results in a seg fault.
- Why is it so big (252k/256K)?
- How much memory is physically allocated for this segment?
Thanks for reading sofar
Erik Niessen
10001000 (4 KB) rwxp (00:00 0) [heap]
2aaa8000 (20 KB) r-xp (00:07 1795853) /lib/ld-uClibc-0.9.27.so
2aaad000 (4 KB) rw-p (00:00 0)
2aaed000 (4 KB) rw-p (00:07 1795853) /lib/ld- uClibc-0.9.27.so
2aaee000 (48 KB) r-xp (00:07 1795861) /lib/libgcc_s.so.1
2aafa000 (252 KB) ---p (00:00 0)
2ab39000 (4 KB) rw-p (00:07 1795861) /lib/libgcc_s.so.1
2ab3a000 (368 KB) r-xp (00:07 1795855) /lib/libuClibc-0.9.27.so
2ab96000 (256 KB) ---p (00:00 0)
2abd6000 (8 KB) rw-p (00:07 1795855) /lib/libuClibc- 0.9.27.so
2abd8000 (16 KB) rw-p (00:00 0)
7fd49000 (84 KB) rwxp (00:00 0) [stack]
mapped: 1076 KB writable/private: 128 KB shared: 0 KB
It seems that the bss segments of the shared libs are protected and mapped to the zero page. I don't see this
when I run this on a linux pc. I have the following questions:
- Why is this segment protected? Accessing results in a seg fault.
- Why is it so big (252k/256K)?
- How much memory is physically allocated for this segment?
Thanks for reading sofar
Erik Niessen