[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-libc-dev] Stack pointer loaded on main entry?
From: |
Harald Kipp |
Subject: |
Re: [avr-libc-dev] Stack pointer loaded on main entry? |
Date: |
Fri, 07 Mar 2003 13:02:40 +0100 |
How would you be able to fetch the current stack pointer value if it
hasn't been initialized yet (as in the regular main() case)?
Oops, I overlooked that one. From the avr-libc documentation,
chapter "Memory Sections":
.init2:
In C programs, weakly bound to initialize the stack.
And indeed, gcrt1.S initializes the stack in .init2. But this is
completely senseless, because that stack setting is never used,
before main overrides it.
Harald
Re: [avr-libc-dev] Stack pointer loaded on main entry?, Marek Michalkiewicz, 2003/03/07