Trim down peak calculation a bit.
[kugel-rb.git] / firmware / target / arm / tcc77x / boot.lds
blob6303de0c342f001e956e730c5c3cf56e628f23d9
1 #include "config.h"
3 ENTRY(start)
4 OUTPUT_FORMAT(elf32-littlearm)
5 OUTPUT_ARCH(arm)
6 STARTUP(target/arm/tcc77x/crt0.o)
8 #define DRAMSIZE (MEMORYSIZE * 0x100000)
10 #define DRAMORIG 0x20000000
11 #define IRAMORIG 0x00000000
12 #define IRAMSIZE 64K
15 MEMORY
17 #ifdef TCCBOOT
18    DRAM : ORIGIN = DRAMORIG + DRAMSIZE - 0x100000, LENGTH = 0x100000
19 #else
20    DRAM : ORIGIN = DRAMORIG, LENGTH = DRAMSIZE
21 #endif
22    IRAM : ORIGIN = IRAMORIG, LENGTH = IRAMSIZE
25 SECTIONS
27     .text : {
28         *(.init.text)
29         *(.text)
30         *(.text*)
31         *(.glue_7)
32         *(.glue_7t)
33    } > DRAM
35     .data : {
36         *(.icode)
37         *(.irodata)
38         *(.idata)
39         *(.data*)
40         *(.rodata.*)
41         *(.rodata)
42         . = ALIGN(0x4);
43         _dataend = . ;
44     } > DRAM
46     .stack (NOLOAD) :
47     {
48          *(.stack)
49          _stackbegin = .;
50          stackbegin = .;
51          . += 0x2000;
52          _stackend = .;
53          stackend = .;
54     } > DRAM
56     .bss (NOLOAD) : {
57          _edata = .;
58          *(.bss*);
59          *(.ibss);
60          *(COMMON)
61          _end = .;
62      } > DRAM