From: Ralf Baechle <ralf@linux-mips.org>
To: Teresa Tao <TERESAT@TTI-DM.COM>
Cc: linux-mips@linux-mips.org
Subject: Re: question regarding bss section
Date: Mon, 27 Oct 2003 19:09:57 +0100 [thread overview]
Message-ID: <20031027180957.GA25797@linux-mips.org> (raw)
In-Reply-To: <92F2591F460F684C9C309EB0D33256FA01B750B3@trid-mail1.tridentmicro.com>
On Mon, Oct 27, 2003 at 09:44:05AM -0800, Teresa Tao wrote:
> I have several questions and hope somebody could help me with the answers:
> 1. how to use gcc to compile the user mode program with larger stack size?
Not at all. Stack size is a resource limit which is set with can be
manipulated with setrlimit(2) or in bash with the ulimit command. It
defaults to 8MB.
For pthread applications the stack size is a thead attribute, seem libc
manual.
> 2. Inside the user mode program, I have declared some gloabal data which
> is being put on the bss section and I would like to know whom initialize
> the bss section?
.bss is uninitialized. Initialized data can't be in .bss.
> How big is the bss section? Under what kind of situation,
As big as needed for everything in it.
> the bss section data could be corrupted?
There's millions of ways of writing broken code.
> 3. What's the difference to compile the program with -G 0 option? That
> menas I don't use the $gp register, will there be any side effect?
-G 0 is the default for userspace. Iow. passing the option changed nothing.
Ralf
next prev parent reply other threads:[~2003-10-27 18:10 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-10-27 17:44 question regarding bss section Teresa Tao
2003-10-27 17:44 ` Teresa Tao
2003-10-27 18:09 ` Ralf Baechle [this message]
2003-10-27 18:17 ` Wolfgang Denk
2003-10-27 19:08 ` Ralf Baechle
2003-10-27 19:49 ` Wolfgang Denk
2003-10-27 23:01 ` Ralf Baechle
2003-10-27 18:16 ` Wolfgang Denk
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=20031027180957.GA25797@linux-mips.org \
--to=ralf@linux-mips.org \
--cc=TERESAT@TTI-DM.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox