X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;ds=sidebyside;f=cpu%2Farm%2Fscripts%2Fsam7s256_rom.ld;h=26540d076074878e33154e72e1d3d7fbfd2d2fae;hb=1723d9ca9f80afeb686453c6971ebf4e43a592d5;hp=6dc69c75f18cdeb95958ffdb3b22fcffa058e6df;hpb=71956bedd3a3b40d5e2b1fed01ef921b81f8ba0f;p=bertos.git diff --git a/cpu/arm/scripts/sam7s256_rom.ld b/cpu/arm/scripts/sam7s256_rom.ld index 6dc69c75..26540d07 100644 --- a/cpu/arm/scripts/sam7s256_rom.ld +++ b/cpu/arm/scripts/sam7s256_rom.ld @@ -79,11 +79,20 @@ */ -ENTRY(ResetHandler) +ENTRY(_init) SEARCH_DIR(.) OUTPUT_FORMAT("elf32-littlearm", "elf32-bigarm", "elf32-littlearm") OUTPUT_ARCH(arm) +/* + * Define memory configuration for AT91SAM7S + */ +MEMORY +{ + rom(rx) : org = 0x00100000, len = 256k + ram(rwx) : org = 0x00200000, len = 64k +} + /* * Define stack size here @@ -94,45 +103,41 @@ ABT_STACK_SIZE = 0x0100; UND_STACK_SIZE = 0x0100; SVC_STACK_SIZE = 0x0400; -/* - * Define memory configuration for AT91SAM7S - */ -MEMORY -{ - rom(rx) : org = 0x00000000, len = 256k - ram(rw) : org = 0x00200000, len = 64k -} - /* * Allocate section memory */ SECTIONS { - .text : - { - * ( .vectors ); - . = ALIGN ( 4 ); - * ( .init ); - . = ALIGN ( 4 ); + .text : + { + * (.vectors); + . = ALIGN (4); + * (.init); + . = ALIGN (4); + * (.rodata); + . = ALIGN (4); + * (.rodata*); + . = ALIGN (4); + * (.text); + . = ALIGN (4); + *(.glue_7t); + . = ALIGN(4); + *(.glue_7); + . = ALIGN(4); } > rom - . = ALIGN ( 4 ); _etext = .; - PROVIDE ( __etext = . ); + PROVIDE (__etext = .); - .data : AT ( __etext ) + .data : AT (__etext) { - PROVIDE ( __data_start = . ); - * ( .data ) - . = ALIGN ( 4 ); + PROVIDE (__data_start = .); + * (.data) + . = ALIGN (4); _edata = .; - PROVIDE ( __data_end = . ); - } - > ram + PROVIDE (__data_end = .); + } > ram -/* - * Allocate bss section and stack. - */ .bss : { PROVIDE (__bss_start = .); @@ -140,39 +145,41 @@ SECTIONS *(COMMON) . = ALIGN(4); PROVIDE (__bss_end = .); + } > ram - . = ALIGN(256); - - PROVIDE (__stack_start = .); +/* + * Allocate stack at the end of bss section. + * Data heap is allocate at end of stack. + */ + PROVIDE (__stack_start = .); - PROVIDE (__stack_fiq_start = .); - . += FIQ_STACK_SIZE; - . = ALIGN(4); - PROVIDE (__stack_fiq_end = .); + PROVIDE (__stack_fiq_start = .); + . += FIQ_STACK_SIZE; + . = ALIGN(4); + PROVIDE (__stack_fiq_end = .); - PROVIDE (__stack_irq_start = .); - . += IRQ_STACK_SIZE; - . = ALIGN(4); - PROVIDE (__stack_irq_end = .); + PROVIDE (__stack_irq_start = .); + . += IRQ_STACK_SIZE; + . = ALIGN(4); + PROVIDE (__stack_irq_end = .); - PROVIDE (__stack_abt_start = .); - . += ABT_STACK_SIZE; - . = ALIGN(4); - PROVIDE (__stack_abt_end = .); + PROVIDE (__stack_abt_start = .); + . += ABT_STACK_SIZE; + . = ALIGN(4); + PROVIDE (__stack_abt_end = .); - PROVIDE (__stack_und_start = .); - . += UND_STACK_SIZE; - . = ALIGN(4); - PROVIDE (__stack_und_end = .); + PROVIDE (__stack_und_start = .); + . += UND_STACK_SIZE; + . = ALIGN(4); + PROVIDE (__stack_und_end = .); - PROVIDE (__stack_svc_start = .); - . += SVC_STACK_SIZE; - . = ALIGN(4); - PROVIDE (__stack_svc_end = .); + PROVIDE (__stack_svc_start = .); + . += SVC_STACK_SIZE; + . = ALIGN(4); + PROVIDE (__stack_svc_end = .); - PROVIDE (__stack_end = .); + PROVIDE (__stack_end = .); - PROVIDE (__heap_start = .); - } > ram + PROVIDE (__heap_start = .); }