From: Ralf Baechle <ralf@linux-mips.org>
To: Erik Niessen <erik.niessen@gmail.com>
Cc: linux-mips@linux-mips.org
Subject: Re: Weird output from pmap
Date: Thu, 7 Sep 2006 06:03:44 +0200 [thread overview]
Message-ID: <20060907040344.GC17965@linux-mips.org> (raw)
In-Reply-To: <f21fe8a50609042355o19ab7b50nb5717bfe0d358232@mail.gmail.com>
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
next prev parent reply other threads:[~2006-09-07 4:03 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-09-05 6:55 Weird output from pmap Erik Niessen
2006-09-07 4:03 ` Ralf Baechle [this message]
2006-09-07 7:58 ` Erik Niessen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060907040344.GC17965@linux-mips.org \
--to=ralf@linux-mips.org \
--cc=erik.niessen@gmail.com \
--cc=linux-mips@linux-mips.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.