[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 18:32:03 +0100 |
I'd like to change this for GCC 3.4 (3.3 branch is too
close to release, and I was afraid to break Ethernut ;-) -
You compiler/libc guys broke it so often, that I became used
to it and would otherwise miss something. :-)
For making main returnable, you wrote:
- two bytes of stack space used for main() return address
- exit() always linked in, even if main() never returns
- main() would need an attribute to avoid saving registers
(like h8300 OS_Task, and IAR __C_task).
IMHO, code space is typically no problem, but every
wasted data byte is unacceptable when programming for
small devices. I'd vote for keeping main non-return.
Regarding the bug with "-Wl,--defsym,__stack=0x1ff" and
gcrt1.S:
...But that probably means some
backwards compatibility issues again :(
I can't see any incompatibility here. I don't care, if the linker
fetches .init2 from gcrt1.S or any library. Should I?
Harald
Re: [avr-libc-dev] Stack pointer loaded on main entry?, Marek Michalkiewicz, 2003/03/07
- Re: [avr-libc-dev] Stack pointer loaded on main entry?,
Harald Kipp <=