* emultempl/elf32.em (gld${EMULATION_NAME}_add_sysroot): Fix
[deliverable/binutils-gdb.git] / ld / scripttempl / elf32msp430.sc
1 cat <<EOF
2 OUTPUT_FORMAT("${OUTPUT_FORMAT}","${OUTPUT_FORMAT}","${OUTPUT_FORMAT}")
3 OUTPUT_ARCH(${ARCH})
4
5 MEMORY
6 {
7 text (rx) : ORIGIN = $ROM_START, LENGTH = $ROM_SIZE
8 data (rwx) : ORIGIN = $RAM_START, LENGTH = $RAM_SIZE
9 vectors (rw) : ORIGIN = 0xffe0, LENGTH = 0x20
10 bootloader(rx) : ORIGIN = 0x0c00, LENGTH = 1K
11 infomem(rx) : ORIGIN = 0x1000, LENGTH = 256
12 infomemnobits(rx) : ORIGIN = 0x1000, LENGTH = 256
13 }
14
15 SECTIONS
16 {
17 /* Read-only sections, merged into text segment. */
18 ${TEXT_DYNAMIC+${DYNAMIC}}
19 .hash ${RELOCATING-0} : { *(.hash) }
20 .dynsym ${RELOCATING-0} : { *(.dynsym) }
21 .dynstr ${RELOCATING-0} : { *(.dynstr) }
22 .gnu.version ${RELOCATING-0} : { *(.gnu.version) }
23 .gnu.version_d ${RELOCATING-0} : { *(.gnu.version_d) }
24 .gnu.version_r ${RELOCATING-0} : { *(.gnu.version_r) }
25
26 .rel.init ${RELOCATING-0} : { *(.rel.init) }
27 .rela.init ${RELOCATING-0} : { *(.rela.init) }
28 .rel.text ${RELOCATING-0} :
29 {
30 *(.rel.text)
31 ${RELOCATING+*(.rel.text.*)}
32 ${RELOCATING+*(.rel.gnu.linkonce.t*)}
33 }
34 .rela.text ${RELOCATING-0} :
35 {
36 *(.rela.text)
37 ${RELOCATING+*(.rela.text.*)}
38 ${RELOCATING+*(.rela.gnu.linkonce.t*)}
39 }
40 .rel.fini ${RELOCATING-0} : { *(.rel.fini) }
41 .rela.fini ${RELOCATING-0} : { *(.rela.fini) }
42 .rel.rodata ${RELOCATING-0} :
43 {
44 *(.rel.rodata)
45 ${RELOCATING+*(.rel.rodata.*)}
46 ${RELOCATING+*(.rel.gnu.linkonce.r*)}
47 }
48 .rela.rodata ${RELOCATING-0} :
49 {
50 *(.rela.rodata)
51 ${RELOCATING+*(.rela.rodata.*)}
52 ${RELOCATING+*(.rela.gnu.linkonce.r*)}
53 }
54 .rel.data ${RELOCATING-0} :
55 {
56 *(.rel.data)
57 ${RELOCATING+*(.rel.data.*)}
58 ${RELOCATING+*(.rel.gnu.linkonce.d*)}
59 }
60 .rela.data ${RELOCATING-0} :
61 {
62 *(.rela.data)
63 ${RELOCATING+*(.rela.data.*)}
64 ${RELOCATING+*(.rela.gnu.linkonce.d*)}
65 }
66 .rel.ctors ${RELOCATING-0} : { *(.rel.ctors) }
67 .rela.ctors ${RELOCATING-0} : { *(.rela.ctors) }
68 .rel.dtors ${RELOCATING-0} : { *(.rel.dtors) }
69 .rela.dtors ${RELOCATING-0} : { *(.rela.dtors) }
70 .rel.got ${RELOCATING-0} : { *(.rel.got) }
71 .rela.got ${RELOCATING-0} : { *(.rela.got) }
72 .rel.bss ${RELOCATING-0} : { *(.rel.bss) }
73 .rela.bss ${RELOCATING-0} : { *(.rela.bss) }
74 .rel.plt ${RELOCATING-0} : { *(.rel.plt) }
75 .rela.plt ${RELOCATING-0} : { *(.rela.plt) }
76
77 /* Internal text space. */
78 .text :
79 {
80 *(.init)
81 ${RELOCATING+. = ALIGN(2);}
82 *(.text)
83 ${RELOCATING+. = ALIGN(2);}
84 *(.text.*)
85 ${RELOCATING+. = ALIGN(2);}
86 *(.fini)
87 ${RELOCATING+ _etext = . ; }
88 } ${RELOCATING+ > text}
89
90 .data ${RELOCATING-0} : ${RELOCATING+AT (ADDR (.text) + SIZEOF (.text))}
91 {
92 ${RELOCATING+ PROVIDE (__data_start = .) ; }
93 ${RELOCATING+. = ALIGN(2);}
94 *(.data)
95 ${RELOCATING+. = ALIGN(2);}
96 *(.gnu.linkonce.d*)
97 ${RELOCATING+. = ALIGN(2);}
98 ${RELOCATING+ _edata = . ; }
99 } ${RELOCATING+ > data}
100
101 /* Bootloader. */
102 .bootloader ${RELOCATING-0} :
103 {
104 ${RELOCATING+ PROVIDE (__boot_start = .) ; }
105 *(.bootloader)
106 ${RELOCATING+. = ALIGN(2);}
107 *(.bootloader.*)
108 } ${RELOCATING+ > bootloader}
109
110 /* Information memory. */
111 .infomem ${RELOCATING-0} :
112 {
113 *(.infomem)
114 ${RELOCATING+. = ALIGN(2);}
115 *(.infomem.*)
116 } ${RELOCATING+ > infomem}
117
118 /* Information memory (not loaded into MPU). */
119 .infomemnobits ${RELOCATING-0} :
120 {
121 *(.infomemnobits)
122 ${RELOCATING+. = ALIGN(2);}
123 *(.infomemnobits.*)
124 } ${RELOCATING+ > infomemnobits}
125
126 .bss ${RELOCATING+ SIZEOF(.data) + ADDR(.data)} :
127 {
128 ${RELOCATING+ PROVIDE (__bss_start = .) ; }
129 *(.bss)
130 *(COMMON)
131 ${RELOCATING+ PROVIDE (__bss_end = .) ; }
132 ${RELOCATING+ _end = . ; }
133 } ${RELOCATING+ > data}
134
135 .noinit ${RELOCATING+ SIZEOF(.bss) + ADDR(.bss)} :
136 {
137 ${RELOCATING+ PROVIDE (__noinit_start = .) ; }
138 *(.noinit)
139 *(COMMON)
140 ${RELOCATING+ PROVIDE (__noinit_end = .) ; }
141 ${RELOCATING+ _end = . ; }
142 } ${RELOCATING+ > data}
143
144 .vectors ${RELOCATING-0}:
145 {
146 ${RELOCATING+ PROVIDE (__vectors_start = .) ; }
147 *(.vectors*)
148 ${RELOCATING+ _vectors_end = . ; }
149 } ${RELOCATING+ > vectors}
150
151
152 /* Stabs debugging sections. */
153 .stab 0 : { *(.stab) }
154 .stabstr 0 : { *(.stabstr) }
155 .stab.excl 0 : { *(.stab.excl) }
156 .stab.exclstr 0 : { *(.stab.exclstr) }
157 .stab.index 0 : { *(.stab.index) }
158 .stab.indexstr 0 : { *(.stab.indexstr) }
159 .comment 0 : { *(.comment) }
160
161 /* DWARF debug sections.
162 Symbols in the DWARF debugging sections are relative to the beginning
163 of the section so we begin them at 0. */
164
165 /* DWARF 1 */
166 .debug 0 : { *(.debug) }
167 .line 0 : { *(.line) }
168
169 /* GNU DWARF 1 extensions */
170 .debug_srcinfo 0 : { *(.debug_srcinfo) }
171 .debug_sfnames 0 : { *(.debug_sfnames) }
172
173 /* DWARF 1.1 and DWARF 2 */
174 .debug_aranges 0 : { *(.debug_aranges) }
175 .debug_pubnames 0 : { *(.debug_pubnames) }
176
177 /* DWARF 2 */
178 .debug_info 0 : { *(.debug_info) *(.gnu.linkonce.wi.*) }
179 .debug_abbrev 0 : { *(.debug_abbrev) }
180 .debug_line 0 : { *(.debug_line) }
181 .debug_frame 0 : { *(.debug_frame) }
182 .debug_str 0 : { *(.debug_str) }
183 .debug_loc 0 : { *(.debug_loc) }
184 .debug_macinfo 0 : { *(.debug_macinfo) }
185
186 PROVIDE (__stack = ${STACK}) ;
187 PROVIDE (__data_start_rom = _etext) ;
188 PROVIDE (__data_end_rom = _etext + SIZEOF (.data)) ;
189 PROVIDE (__noinit_start_rom = _etext + SIZEOF (.data)) ;
190 PROVIDE (__noinit_end_rom = _etext + SIZEOF (.data) + SIZEOF (.noinit)) ;
191 }
192 EOF
This page took 0.042984 seconds and 4 git commands to generate.