[fpc-devel] Arm embedded

Florian Klaempfl florian at freepascal.org
Mon Sep 28 16:35:06 CEST 2009


Carsten Bager schrieb:
>> How does the linker script look like?
> 
> MEMORY {
>    flash : ORIGIN = 0, LENGTH = 512K
>    ram : ORIGIN = 0x40000000, LENGTH = 32K
>    }
> 
> __stack_end__ = 0x40000000 + 31K;
> __ram_end__ = 0x40000000 + 32K-4;
> SECTIONS {
>   . = 0;
>   startup : { *(.startup)} >flash
>   prog : {
>          *(.text)

This should be *(.text, .text.*)

>          *(.rodata)
>          *(.rodata*)
>          *(.glue_7)
>          *(.glue_7t)
>          } >flash
>   __end_of_text__ = .;
>   .data : {
>          __data_beg__ = .;
>          __data_beg_src__ = __end_of_text__;
>          *(.data)

*(.data, .data.*)

>          __data_end__ = .;
>          } >ram AT>flash
>   .bss : {
>          __bss_beg__ = .;
>          *(.bss)

*(.bss, .bss.*)

>          } >ram
>     /* Align here to ensure that the .bss section occupies space up to
>        _end.  Align after .bss to ensure correct alignment even if the
>        .bss section disappears because there are no input sections.  */
>     . = ALIGN(32 / 8);
>    }
>    . = ALIGN(32 / 8);
>    _end = .;
>    _bss_end__ = . ; __bss_end__ = . ; __end__ = . ;
>    PROVIDE (end = .);
> 
> 
> 
> _______________________________________________
> fpc-devel maillist  -  fpc-devel at lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-devel
> 




More information about the fpc-devel mailing list