[Top][All Lists]

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

Re: [avr-gcc-list] minit-stack

From: Joerg Wunsch
Subject: Re: [avr-gcc-list] minit-stack
Date: Thu, 23 Oct 2008 07:25:43 +0200 (MET DST)

Ruud Vlaming <address@hidden> wrote:

> On gcc 4.2.3 it was possible to use something like
>   -minit-stack="xOS+xOSstackShift"

While -minit-stack used to be documented (but deprecated, as you
already noticed), the option to perform calculations in its value was
never documented at all.

Historically, the stack has been initialized twice, once in the
startup code of the library, and another one at the entry of main().
-minit-stack only affected the latter, while the symbol __stack has
always been used for both.

On the course of making main() a normal function (according to the
standard, it's OK to call main() recursively), one of the steps
necessary was to remove the (pointless) stack initialization at the
beginning of main().

cheers, J"org               .-.-.   --... ...--   -.. .  DL8DTL

http://www.sax.de/~joerg/                        NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]