avr-chat
[Top][All Lists]
Advanced

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

Re: [avr-chat] Startup code.


From: Erik Christiansen
Subject: Re: [avr-chat] Startup code.
Date: Wed, 22 Sep 2010 22:57:51 +1000
User-agent: Mutt/1.5.17+20080114 (2008-01-14)

On Wed, Sep 22, 2010 at 01:26:09PM +0200, Robert von Knobloch wrote:
> What is also interesting is that an "avr-objdump -d crttn13.o" in the
> avr-libc source reveals that the stack pointer (0x3d) is set to 0.
> 
> 
> Disassembly of section .init2:
> 
> 00000000 <.init2>:
>    0:   11 24           eor     r1, r1
>    2:   1f be           out     0x3f, r1        ; 63
>    4:   c0 e0           ldi     r28, 0x00       ; 0
>    6:   cd bf           out     0x3d, r28       ; 61

Nope, that's just because crttn13.o is a relocatable object file.
When it's run through ld again, during your make, the absent value is
filled in.

> Disassembly of section .init9:
> 
> 
> Somehow (make process?) this is being changed to 0x1f in the case ot
> tiny13. Now to find out where, because if I just edit crttn13.0 to
> remove lines 4 & 6 (which is the effect that I want), I expect it will
> break something in the compile chain.

Not necessarily. It is a weak symbol in crttn13.o. If it also is where
it is coming from, then that invites you to overwrite the default value.

You can do that in assembler, C, or the linker script, possibly under
makefile control, since you have those processor 'alternatives'.

Erik



reply via email to

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