FT32 initial support
[deliverable/binutils-gdb.git] / ld / scripttempl / ft32.sc
1 TORS=".tors :
2 {
3 ___ctors = . ;
4 *(.ctors)
5 ___ctors_end = . ;
6 ___dtors = . ;
7 *(.dtors)
8 ___dtors_end = . ;
9 . = ALIGN(4);
10 } > ram"
11
12 cat <<EOF
13 OUTPUT_FORMAT("${OUTPUT_FORMAT}")
14 OUTPUT_ARCH(${ARCH})
15 ${LIB_SEARCH_DIRS}
16
17 MEMORY
18 {
19 flash (rx) : ORIGIN = 0, LENGTH = 256K
20 ram (rw!x) : ORIGIN = 0x800000, LENGTH = 64K
21 }
22 SECTIONS
23 {
24 .text :
25 {
26 *(.text*)
27 *(.strings)
28 *(._pm*)
29 *(.init)
30 *(.fini)
31 ${RELOCATING+ _etext = . ; }
32 . = ALIGN(4);
33 } ${RELOCATING+ > flash}
34 ${CONSTRUCTING+${TORS}}
35 .data : AT (ADDR (.text) + SIZEOF (.text))
36 {
37 *(.data)
38 *(.rodata)
39 *(.rodata*)
40 ${RELOCATING+ _edata = . ; }
41 } ${RELOCATING+ > ram}
42 .bss SIZEOF(.data) + ADDR(.data) :
43 {
44 ${RELOCATING+ _bss_start = . ; }
45 *(.bss)
46 *(COMMON)
47 ${RELOCATING+ _end = . ; }
48 } ${RELOCATING+ > ram}
49
50 ${RELOCATING+ __data_load_start = LOADADDR(.data); }
51 ${RELOCATING+ __data_load_end = __data_load_start + SIZEOF(.data); }
52
53 .stab 0 ${RELOCATING+(NOLOAD)} :
54 {
55 *(.stab)
56 }
57 .stabstr 0 ${RELOCATING+(NOLOAD)} :
58 {
59 *(.stabstr)
60 }
61 }
62 EOF
This page took 0.036425 seconds and 4 git commands to generate.