This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: When should I setup the stack pointer?
- From: Nick Garnett <nickg at ecoscentric dot com>
- To: "Qiang Huang" <jameshq at liverpool dot ac dot uk>
- Cc: "Ecos-Discuss" <ecos-discuss at sources dot redhat dot com>
- Date: 14 Oct 2002 18:30:50 +0100
- Subject: Re: [ECOS] When should I setup the stack pointer?
- References: <BDEPKKELILOKGOAOMONOMEFBCAAA.jameshq@liv.ac.uk>
"Qiang Huang" <jameshq@liverpool.ac.uk> writes:
> Hi all:
> I just wonder when should I setup the stack pointer if I am not using
> redboot or gdb stub to run my ecos application? how to relate .bss section
> to the stack pointer? (Is the stack inside the .bss section?)
>
> For example: Sparc taget, should I setup the stack k pointer in the very
> beginning (surely after setting up the VSR) of the program in vectors.S?
>
Most HALs set the stack pointer as soon as it makes sense to do
so. Usually after the basic initialization has been done. As long as
it is done before anything that might use it, like a function call, it
does not really matter when it happens.
--
Nick Garnett - eCos Kernel Architect
http://www.eCosCentric.com/
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss