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
> 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.