Add MPIO HD200 port - new files
[kugel-rb.git] / firmware / target / coldfire / mpio / boot.lds.flash
blob2b086586ad3e2c602f5b3c9319ac05c911137e70
1 #include "config.h"
3 ENTRY(start)
4 OUTPUT_FORMAT(elf32-m68k)
5 STARTUP(target/coldfire/crt0.o)
7 #define DRAMSIZE (MEMORYSIZE * 0x100000)
9 #define DRAMORIG 0x31000000
10 #define IRAMORIG 0x10000000
11 #define IRAMSIZE 0x18000
12 #define FLASHORIG 0x000e0000
13 #define FLASHSIZE 0x1f800
15 MEMORY
17    DRAM : ORIGIN = DRAMORIG, LENGTH = DRAMSIZE
18    IRAM : ORIGIN = IRAMORIG, LENGTH = IRAMSIZE
19    FLASH : ORIGIN = FLASHORIG, LENGTH = FLASHSIZE
22 SECTIONS
24     .vectors :
25     {
26         _datacopy = .;
27     } > FLASH
29     .data : AT ( _datacopy )
30     {
31         _datastart = .;
32         KEEP(*(.resetvectors));
33         *(.resetvectors);
34         KEEP(*(.vectors));
35         *(.vectors);
36         . = ALIGN(0x200);
37         *(.icode)
38         *(.irodata)
39         *(.idata)
40         *(.data*)
41         . = ALIGN(0x4);
42         _dataend = .;
43         . = ALIGN(0x10);  /* Maintain proper alignment for .text section */
44     } > IRAM
46     /* TRICK ALERT! Newer versions of the linker don't allow output sections
47        to overlap even if one of them is empty, so advance the location pointer
48        "by hand" */
49     .text LOADADDR(.data) + SIZEOF(.data) :
50     {
51         *(.init.text)
52         *(.text*)
53         . = ALIGN(0x4);
54     } > FLASH
56     .rodata :
57     {
58         *(.rodata*)
59         . = ALIGN(0x4);
60         _iramcopy = .;
61     } > FLASH
63     .stack :
64     {
65        *(.stack)
66        _stackbegin = .;
67        stackbegin = .;
68        . += 0x2000;
69        _stackend = .;
70        stackend = .;
71     } > IRAM
73     .bss DRAMORIG+0x800000:
74     {
75        _edata = .;
76         *(.ibss)
77         *(.bss*)
78         *(COMMON)
79        _end = .;
80     } > DRAM