Sorry I did a mistake myself:
The appropriate elfbios.lds SECTIONS part should read as:
>SECTIONS
>{
>                       /* Text and read-only data      */
>  .text : {
>        _text = .;
>        *(.text)
>        *(.fixup)
>        *(.gnu.warning)
>        *(.rodata)
>         _etext = .;   /* End of text section          */
>  }
>  _sz_text = SIZEOF(.text) ;
>
>  .data : {                        /* Data                         */
>         _data = .;
>        *(.data)
>         _edata = .;             /* End of data section          */  
>      }
> _sz_data = SIZEOF(.data) ;
>
>               /* BSS                          */
>  .bss : {
>       _bss_start = .;  
>      *(.bss)
>       _end = . ;
>        }
>  _sz_bss = SIZEOF(.bss)
>}

and the crt0.S associated code should read as:

>/*
> * Copy .data section in RAM
> */    
>       mov     r1, #0x1000
>       ldr     r2, =SYMBOL_NAME(_data)
>       ldr     r3, =SYMBOL_NAME(_sz_data)
>1:     ldr     r0, [r2], #4
>       str     r0, [r1], #4
>       subs    r3, r3, #4
>       bgt     1b

And we can get rid of the two lines at the entry defining sp:
_entry:
/*
 *Choose supervisor mode and disable IRQ & IFQ interrupts
 */
        mrs     r0, cpsr
        bic     r0, r0, #0x1f
        orr     r0, r0, #0xd3
        msr     cpsr, r0
...

Am I totally wrong here?

-- 
Fran�ois Desloges
[EMAIL PROTECTED]
unsubscribe: body of `unsubscribe linux-arm' to [EMAIL PROTECTED]

Reply via email to