Re: Weird output from pmap

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Sep 05, 2006 at 08:55:18AM +0200, Erik Niessen wrote:

> /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<http://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<http://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.

Protecting a bss segment doesn't make sense.

The address and the "---p" flags make me suspect your executable might
actually be wrong, so I suggest you check the binary with something like
readelf -S.

> - Why is it so big (252k/256K)?
> - How much memory is physically allocated for this segment?

None at this stage - the actuall allocation would happen lazily when
a page is touched first which of course doesn't ever happen in your
case.

  Ralf


[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux