Update year range in copyright notice of all files.
[deliverable/binutils-gdb.git] / ld / scripttempl / elf32msp430_3.sc
CommitLineData
2571583a 1# Copyright (C) 2014-2017 Free Software Foundation, Inc.
985743c7
NC
2#
3# Copying and distribution of this file, with or without modification,
4# are permitted in any medium without royalty provided the copyright
5# notice and this notice are preserved.
6
2469cfa2 7cat <<EOF
2571583a 8/* Copyright (C) 2014-2017 Free Software Foundation, Inc.
985743c7
NC
9
10 Copying and distribution of this script, with or without modification,
11 are permitted in any medium without royalty provided the copyright
12 notice and this notice are preserved. */
13
2469cfa2
NC
14OUTPUT_FORMAT("${OUTPUT_FORMAT}","${OUTPUT_FORMAT}","${OUTPUT_FORMAT}")
15OUTPUT_ARCH(${ARCH})
16
17MEMORY
18{
19 text (rx) : ORIGIN = $ROM_START, LENGTH = $ROM_SIZE
20 data (rwx) : ORIGIN = $RAM_START, LENGTH = $RAM_SIZE
21 vectors (rw) : ORIGIN = 0xffe0, LENGTH = 0x20
22}
23
24SECTIONS
25{
26 /* Read-only sections, merged into text segment. */
27 ${TEXT_DYNAMIC+${DYNAMIC}}
ec2d9b29
AM
28 .hash ${RELOCATING-0} : { *(.hash) }
29 .dynsym ${RELOCATING-0} : { *(.dynsym) }
30 .dynstr ${RELOCATING-0} : { *(.dynstr) }
31 .gnu.version ${RELOCATING-0} : { *(.gnu.version) }
32 .gnu.version_d ${RELOCATING-0} : { *(.gnu.version_d) }
33 .gnu.version_r ${RELOCATING-0} : { *(.gnu.version_r) }
2469cfa2 34
ec2d9b29
AM
35 .rel.init ${RELOCATING-0} : { *(.rel.init) }
36 .rela.init ${RELOCATING-0} : { *(.rela.init) }
37 .rel.text ${RELOCATING-0} :
2469cfa2
NC
38 {
39 *(.rel.text)
40 ${RELOCATING+*(.rel.text.*)}
41 ${RELOCATING+*(.rel.gnu.linkonce.t*)}
42 }
ec2d9b29 43 .rela.text ${RELOCATING-0} :
2469cfa2
NC
44 {
45 *(.rela.text)
46 ${RELOCATING+*(.rela.text.*)}
47 ${RELOCATING+*(.rela.gnu.linkonce.t*)}
48 }
ec2d9b29
AM
49 .rel.fini ${RELOCATING-0} : { *(.rel.fini) }
50 .rela.fini ${RELOCATING-0} : { *(.rela.fini) }
51 .rel.rodata ${RELOCATING-0} :
2469cfa2
NC
52 {
53 *(.rel.rodata)
54 ${RELOCATING+*(.rel.rodata.*)}
55 ${RELOCATING+*(.rel.gnu.linkonce.r*)}
56 }
ec2d9b29 57 .rela.rodata ${RELOCATING-0} :
2469cfa2
NC
58 {
59 *(.rela.rodata)
60 ${RELOCATING+*(.rela.rodata.*)}
61 ${RELOCATING+*(.rela.gnu.linkonce.r*)}
62 }
ec2d9b29 63 .rel.data ${RELOCATING-0} :
2469cfa2
NC
64 {
65 *(.rel.data)
66 ${RELOCATING+*(.rel.data.*)}
67 ${RELOCATING+*(.rel.gnu.linkonce.d*)}
68 }
ec2d9b29 69 .rela.data ${RELOCATING-0} :
2469cfa2
NC
70 {
71 *(.rela.data)
72 ${RELOCATING+*(.rela.data.*)}
73 ${RELOCATING+*(.rela.gnu.linkonce.d*)}
74 }
ec2d9b29
AM
75 .rel.ctors ${RELOCATING-0} : { *(.rel.ctors) }
76 .rela.ctors ${RELOCATING-0} : { *(.rela.ctors) }
77 .rel.dtors ${RELOCATING-0} : { *(.rel.dtors) }
78 .rela.dtors ${RELOCATING-0} : { *(.rela.dtors) }
79 .rel.got ${RELOCATING-0} : { *(.rel.got) }
80 .rela.got ${RELOCATING-0} : { *(.rela.got) }
81 .rel.bss ${RELOCATING-0} : { *(.rel.bss) }
82 .rela.bss ${RELOCATING-0} : { *(.rela.bss) }
83 .rel.plt ${RELOCATING-0} : { *(.rel.plt) }
84 .rela.plt ${RELOCATING-0} : { *(.rela.plt) }
2469cfa2
NC
85
86 /* Internal text space. */
87 .text :
88 {
d4b6ee67 89 ${RELOCATING+. = ALIGN(2);}
b2e4da5a
L
90 *(SORT_NONE(.init))
91 *(SORT_NONE(.init0)) /* Start here after reset. */
92 *(SORT_NONE(.init1))
93 *(SORT_NONE(.init2))
94 *(SORT_NONE(.init3))
95 *(SORT_NONE(.init4))
96 *(SORT_NONE(.init5))
97 *(SORT_NONE(.init6)) /* C++ constructors. */
98 *(SORT_NONE(.init7))
99 *(SORT_NONE(.init8))
100 *(SORT_NONE(.init9)) /* Call main(). */
d4b6ee67
NC
101
102 ${CONSTRUCTING+ __ctors_start = . ; }
103 ${CONSTRUCTING+ *(.ctors) }
104 ${CONSTRUCTING+ __ctors_end = . ; }
105 ${CONSTRUCTING+ __dtors_start = . ; }
106 ${CONSTRUCTING+ *(.dtors) }
107 ${CONSTRUCTING+ __dtors_end = . ; }
108
2469cfa2
NC
109 ${RELOCATING+. = ALIGN(2);}
110 *(.text)
111 ${RELOCATING+. = ALIGN(2);}
112 *(.text.*)
13761a11
NC
113 ${RELOCATING+. = ALIGN(2);}
114 *(.text:*)
d4b6ee67 115
2469cfa2 116 ${RELOCATING+. = ALIGN(2);}
b2e4da5a
L
117 *(SORT_NONE(.fini9))
118 *(SORT_NONE(.fini8))
119 *(SORT_NONE(.fini7))
120 *(SORT_NONE(.fini6)) /* C++ destructors. */
121 *(SORT_NONE(.fini5))
122 *(SORT_NONE(.fini4))
123 *(SORT_NONE(.fini3))
124 *(SORT_NONE(.fini2))
125 *(SORT_NONE(.fini1))
126 *(SORT_NONE(.fini0)) /* Infinite loop after program termination. */
127 *(SORT_NONE(.fini))
d4b6ee67 128
2469cfa2
NC
129 ${RELOCATING+ _etext = . ; }
130 } ${RELOCATING+ > text}
131
13761a11
NC
132 .rodata :
133 {
134 *(.rodata .rodata.* .gnu.linkonce.r.*)
135 *(.const)
136 *(.const:*)
137 } ${RELOCATING+ > text}
138
925bbbbb 139 .data ${RELOCATING-0} :
2469cfa2
NC
140 {
141 ${RELOCATING+ PROVIDE (__data_start = .) ; }
727f7031 142 ${RELOCATING+. = ALIGN(2);}
2469cfa2 143 *(.data)
727f7031 144 *(.data.*)
2469cfa2
NC
145 *(.gnu.linkonce.d*)
146 ${RELOCATING+. = ALIGN(2);}
147 ${RELOCATING+ _edata = . ; }
925bbbbb 148 } ${RELOCATING+ > data ${RELOCATING+AT> text}}
2469cfa2 149
296ebfbb
NC
150 __romdatastart = LOADADDR(.data);
151 __romdatacopysize = SIZEOF(.data);
152
2469cfa2
NC
153 .bss ${RELOCATING+ SIZEOF(.data) + ADDR(.data)} :
154 {
727f7031 155 ${RELOCATING+. = ALIGN(2);}
2469cfa2 156 ${RELOCATING+ PROVIDE (__bss_start = .) ; }
0d832c8e 157 ${RELOCATING+ PROVIDE (__bssstart = .); }
2469cfa2
NC
158 *(.bss)
159 *(COMMON)
160 ${RELOCATING+ PROVIDE (__bss_end = .) ; }
2469cfa2 161 } ${RELOCATING+ > data}
0d832c8e 162 ${RELOCATING+ PROVIDE (__bsssize = SIZEOF(.bss)); }
2469cfa2
NC
163
164 .noinit ${RELOCATING+ SIZEOF(.bss) + ADDR(.bss)} :
165 {
166 ${RELOCATING+ PROVIDE (__noinit_start = .) ; }
167 *(.noinit)
168 *(COMMON)
169 ${RELOCATING+ PROVIDE (__noinit_end = .) ; }
2469cfa2
NC
170 } ${RELOCATING+ > data}
171
886a2506
NC
172 .persistent ${RELOCATING+ SIZEOF(.noinit) + ADDR(.noinit)} :
173 {
174 ${RELOCATING+ PROVIDE (__persistent_start = .) ; }
175 *(.persistent)
176 ${RELOCATING+ PROVIDE (__persistent_end = .) ; }
177 } ${RELOCATING+ > data}
178
179 ${RELOCATING+ _end = . ;}
180
ec2d9b29 181 .vectors ${RELOCATING-0}:
2469cfa2
NC
182 {
183 ${RELOCATING+ PROVIDE (__vectors_start = .) ; }
184 *(.vectors*)
185 ${RELOCATING+ _vectors_end = . ; }
186 } ${RELOCATING+ > vectors}
187
df154dc1 188 .MSP430.attributes 0 :
13761a11
NC
189 {
190 KEEP (*(.MSP430.attributes))
191 KEEP (*(.gnu.attributes))
192 KEEP (*(__TI_build_attributes))
193 }
194
2469cfa2
NC
195 /* Stabs debugging sections. */
196 .stab 0 : { *(.stab) }
197 .stabstr 0 : { *(.stabstr) }
198 .stab.excl 0 : { *(.stab.excl) }
199 .stab.exclstr 0 : { *(.stab.exclstr) }
200 .stab.index 0 : { *(.stab.index) }
201 .stab.indexstr 0 : { *(.stab.indexstr) }
202 .comment 0 : { *(.comment) }
203
ceb0a680 204EOF
2a995fc1 205
d061dfac 206. $srcdir/scripttempl/DWARF.sc
2a995fc1 207
ceb0a680 208cat <<EOF
2469cfa2 209 PROVIDE (__stack = ${STACK}) ;
db6a5910
NC
210 PROVIDE (__data_start_rom = _etext) ;
211 PROVIDE (__data_end_rom = _etext + SIZEOF (.data)) ;
212 PROVIDE (__noinit_start_rom = _etext + SIZEOF (.data)) ;
213 PROVIDE (__noinit_end_rom = _etext + SIZEOF (.data) + SIZEOF (.noinit)) ;
2469cfa2
NC
214}
215EOF
This page took 0.558188 seconds and 4 git commands to generate.