NOCF_PROTECTION_CFLAGS: Replace nopie with available
[deliverable/binutils-gdb.git] / ld / scripttempl / ft32.sc
CommitLineData
3f8107ab
AM
1TORS=".tors :
2 {
3 ___ctors = . ;
4 *(.ctors)
5 ___ctors_end = . ;
6 ___dtors = . ;
7 *(.dtors)
8 ___dtors_end = . ;
9 . = ALIGN(4);
2bf2bf23 10 } ${RELOCATING+ > ram}"
3f8107ab
AM
11
12cat <<EOF
13OUTPUT_FORMAT("${OUTPUT_FORMAT}")
14OUTPUT_ARCH(${ARCH})
15${LIB_SEARCH_DIRS}
2bf2bf23 16EOF
3f8107ab 17
2bf2bf23 18test -n "${RELOCATING}" && cat <<EOF
1dc8bf19 19/* Allow the command line to override the memory region sizes. */
3a5ce950 20__PMSIZE = DEFINED(__PMSIZE) ? __PMSIZE : 256K;
1dc8bf19
NC
21__RAMSIZE = DEFINED(__RAMSIZE) ? __RAMSIZE : 64K;
22
3f8107ab
AM
23MEMORY
24{
1dc8bf19
NC
25 flash (rx) : ORIGIN = 0, LENGTH = __PMSIZE
26 ram (rw!x) : ORIGIN = 0x800000, LENGTH = __RAMSIZE
3f8107ab 27}
2bf2bf23 28EOF
1dc8bf19 29
2bf2bf23 30cat <<EOF
3f8107ab
AM
31SECTIONS
32{
33 .text :
34 {
2bf2bf23
AM
35 *(.text${RELOCATING+*})
36 ${RELOCATING+*(.strings)
3f8107ab 37 *(._pm*)
2d3181c7
AM
38 KEEP (*(SORT_NONE(.init)))
39 KEEP (*(SORT_NONE(.fini)))
2bf2bf23
AM
40 _etext = .;
41 . = ALIGN(4);}
3f8107ab
AM
42 } ${RELOCATING+ > flash}
43 ${CONSTRUCTING+${TORS}}
d1f70bdc 44 .data : ${RELOCATING+ AT (ADDR (.text) + SIZEOF (.text))}
3f8107ab
AM
45 {
46 *(.data)
2bf2bf23 47 ${RELOCATING+*(.rodata)
3f8107ab 48 *(.rodata*)
2bf2bf23
AM
49 _edata = .;
50 . = ALIGN(4);}
3f8107ab 51 } ${RELOCATING+ > ram}
d1f70bdc 52 .bss ${RELOCATING+ SIZEOF(.data) + ADDR(.data)} :
3f8107ab
AM
53 {
54 ${RELOCATING+ _bss_start = . ; }
55 *(.bss)
2bf2bf23
AM
56 ${RELOCATING+*(COMMON)
57 _end = .;
58 . = ALIGN(4);}
3f8107ab
AM
59 } ${RELOCATING+ > ram}
60
61 ${RELOCATING+ __data_load_start = LOADADDR(.data); }
62 ${RELOCATING+ __data_load_end = __data_load_start + SIZEOF(.data); }
63
64 .stab 0 ${RELOCATING+(NOLOAD)} :
65 {
66 *(.stab)
67 }
68 .stabstr 0 ${RELOCATING+(NOLOAD)} :
69 {
70 *(.stabstr)
71 }
d1f70bdc
NC
72EOF
73
74. $srcdir/scripttempl/DWARF.sc
75
76cat <<EOF
3f8107ab
AM
77}
78EOF
This page took 0.254824 seconds and 4 git commands to generate.