]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - ld/scripttempl/elfd30v.sc
* config/sh/tm-sh.h (BELIEVE_PCC_PROMOTION): Define, so that
[thirdparty/binutils-gdb.git] / ld / scripttempl / elfd30v.sc
CommitLineData
b0f76434
MM
1cat <<EOF
2OUTPUT_FORMAT("${OUTPUT_FORMAT}")
3OUTPUT_ARCH(${ARCH})
4
5MEMORY
6{
26c7ca95
ILT
7 text ${TEXT_DEF_SECTION} : ORIGIN = ${TEXT_START_ADDR}, LENGTH = ${TEXT_SIZE}
8 data ${DATA_DEF_SECTION} : ORIGIN = ${DATA_START_ADDR}, LENGTH = ${DATA_SIZE}
9 emem ${EMEM_DEF_SECTION} : ORIGIN = ${EMEM_START_ADDR}, LENGTH = ${EMEM_SIZE}
10 eit : ORIGIN = ${EIT_START_ADDR}, LENGTH = ${EIT_SIZE}
b0f76434
MM
11}
12
13SECTIONS
14{
03ab605a
MM
15 /* Read-only sections, merged into text segment: */
16 ${TEXT_DYNAMIC+${DYNAMIC}}
17 .hash ${RELOCATING-0} : { *(.hash) }
18 .dynsym ${RELOCATING-0} : { *(.dynsym) }
19 .dynstr ${RELOCATING-0} : { *(.dynstr) }
20 .gnu.version ${RELOCATING-0} : { *(.gnu.version) }
21 .gnu.version_d ${RELOCATING-0} : { *(.gnu.version_d) }
22 .gnu.version_r ${RELOCATING-0} : { *(.gnu.version_r) }
23
24 .rela.text ${RELOCATING-0} : { *(.rela.text) *(.rela.gnu.linkonce.t*) }
25 .rela.data ${RELOCATING-0} : { *(.rela.data) *(.rela.gnu.linkonce.d*) }
26 .rela.rodata ${RELOCATING-0} : { *(.rela.rodata) *(.rela.gnu.linkonce.r*) }
27 .rela.stext ${RELOCATING-0} : { *(.rela.stest) }
28 .rela.etext ${RELOCATING-0} : { *(.rela.etest) }
29 .rela.sdata ${RELOCATING-0} : { *(.rela.sdata) }
30 .rela.edata ${RELOCATING-0} : { *(.rela.edata) }
26c7ca95 31 .rela.eit_v ${RELOCATING-0} : { *(.rela.eit_v) }
03ab605a
MM
32 .rela.sbss ${RELOCATING-0} : { *(.rela.sbss) }
33 .rela.ebss ${RELOCATING-0} : { *(.rela.ebss) }
34 .rela.srodata ${RELOCATING-0} : { *(.rela.srodata) }
35 .rela.erodata ${RELOCATING-0} : { *(.rela.erodata) }
36 .rela.got ${RELOCATING-0} : { *(.rela.got) }
37 .rela.ctors ${RELOCATING-0} : { *(.rela.ctors) }
38 .rela.dtors ${RELOCATING-0} : { *(.rela.dtors) }
39 .rela.init ${RELOCATING-0} : { *(.rela.init) }
40 .rela.fini ${RELOCATING-0} : { *(.rela.fini) }
41 .rela.bss ${RELOCATING-0} : { *(.rela.bss) }
42 .rela.plt ${RELOCATING-0} : { *(.rela.plt) }
43
44 .rel.data ${RELOCATING-0} : { *(.rel.data) *(.rel.gnu.linkonce.d*) }
45 .rel.rodata ${RELOCATING-0} : { *(.rel.rodata) *(.rel.gnu.linkonce.r*) }
46 .rel.stext ${RELOCATING-0} : { *(.rel.stest) }
47 .rel.etext ${RELOCATING-0} : { *(.rel.etest) }
48 .rel.sdata ${RELOCATING-0} : { *(.rel.sdata) }
49 .rel.edata ${RELOCATING-0} : { *(.rel.edata) }
50 .rel.sbss ${RELOCATING-0} : { *(.rel.sbss) }
51 .rel.ebss ${RELOCATING-0} : { *(.rel.ebss) }
26c7ca95 52 .rel.eit_v ${RELOCATING-0} : { *(.rel.eit_v) }
03ab605a
MM
53 .rel.srodata ${RELOCATING-0} : { *(.rel.srodata) }
54 .rel.erodata ${RELOCATING-0} : { *(.rel.erodata) }
55 .rel.got ${RELOCATING-0} : { *(.rel.got) }
56 .rel.ctors ${RELOCATING-0} : { *(.rel.ctors) }
57 .rel.dtors ${RELOCATING-0} : { *(.rel.dtors) }
58 .rel.init ${RELOCATING-0} : { *(.rel.init) }
59 .rel.fini ${RELOCATING-0} : { *(.rel.fini) }
60 .rel.bss ${RELOCATING-0} : { *(.rel.bss) }
61 .rel.plt ${RELOCATING-0} : { *(.rel.plt) }
62
63 .init ${RELOCATING-0} : { *(.init) } =${NOP-0}
64 ${DATA_PLT-${PLT}}
65
b0f76434 66 /* Internal text space */
03ab605a 67 .stext ${RELOCATING-0} : { *(.stext) } ${RELOCATING+ > text}
b0f76434 68
b0f76434
MM
69 /* Internal text space or external memory */
70 .text :
71 {
b0f76434
MM
72 *(.text)
73 *(.gnu.linkonce.t*)
74 *(.init)
75 *(.fini)
b0f76434
MM
76 ${RELOCATING+ _etext = . ; }
77 } ${RELOCATING+ > ${TEXT_MEMORY}}
78
79 /* Internal data space */
03ab605a
MM
80 .srodata ${RELOCATING-0} : { *(.srodata) } ${RELOCATING+ > data}
81 .sdata ${RELOCATING-0} : { *(.sdata) } ${RELOCATING+ > data}
b0f76434 82
b0f76434 83 /* Internal data space or external memory */
b0f76434 84 .rodata ${RELOCATING-0} : { *(.rodata) } ${RELOCATING+ > ${DATA_MEMORY}}
03ab605a
MM
85
86 /* C++ exception support. */
87 .eh_frame ${RELOCATING-0} : { *(.eh_frame) } ${RELOCATING+ > ${DATA_MEMORY}}
b0f76434
MM
88
89 .ctors ${RELOCATING-0} :
90 {
03ab605a 91 ${CONSTRUCTING+ __CTOR_LIST__ = .; }
26c7ca95 92 *(SORT(.ctors.*))
b0f76434 93 *(.ctors)
03ab605a 94 ${CONSTRUCTING+ __CTOR_END__ = .; }
b0f76434
MM
95 } ${RELOCATING+ > ${DATA_MEMORY}}
96
97 .dtors ${RELOCATING-0} :
98 {
03ab605a 99 ${CONSTRUCTING+ __DTOR_LIST__ = .; }
26c7ca95 100 *(SORT(.dtors.*))
b0f76434 101 *(.dtors)
03ab605a 102 ${CONSTRUCTING+ __DTOR_END__ = .; }
b0f76434
MM
103 } ${RELOCATING+ > ${DATA_MEMORY}}
104
105 .data ${RELOCATING-0} :
106 {
107 *(.data)
108 *(.gnu.linkonce.d*)
109 ${CONSTRUCTING+CONSTRUCTORS}
110 ${RELOCATING+ _edata = . ; }
111 } ${RELOCATING+ > ${DATA_MEMORY}}
112
27be0122
MM
113 /* External memory */
114 .etext ${RELOCATING-0} :
115 {
116 ${RELOCATING+ PROVIDE (__etext_start = .) ; }
117 *(.etext)
118 ${RELOCATING+ PROVIDE (__etext_end = .) ; }
119 } ${RELOCATING+ > emem}
120
03ab605a
MM
121 .erodata ${RELOCATING-0} : { *(.erodata) } ${RELOCATING+ > emem}
122 .edata ${RELOCATING-0} : { *(.edata) } ${RELOCATING+ > emem}
27be0122 123
b0f76434
MM
124 .sbss ${RELOCATING-0} :
125 {
126 ${RELOCATING+ PROVIDE (__sbss_start = .) ; }
127 *(.sbss)
128 ${RELOCATING+ PROVIDE (__sbss_end = .) ; }
129 } ${RELOCATING+ > data}
130
131 .ebss ${RELOCATING-0} :
132 {
133 ${RELOCATING+ PROVIDE (__ebss_start = .) ; }
134 *(.ebss)
135 ${RELOCATING+ PROVIDE (__ebss_end = .) ; }
136 } ${RELOCATING+ > data}
137
138 .bss ${RELOCATING-0} :
139 {
140 ${RELOCATING+ PROVIDE (__bss_start = .) ; }
141 *(.bss)
142 *(COMMON)
143 ${RELOCATING+ PROVIDE (__bss_end = .) ; }
144 ${RELOCATING+ _end = . ; }
145 } ${RELOCATING+ > ${DATA_MEMORY}}
146
26c7ca95
ILT
147 .eit_v ${RELOCATING-0} :
148 {
149 ${RELOCATING+ PROVIDE (__eit_start = .) ; }
150 *(.eit_v)
151 ${RELOCATING+ PROVIDE (__eit_end = .) ; }
152 } ${RELOCATING+ > eit}
153
b0f76434
MM
154 /* Stabs debugging sections. */
155 .stab 0 : { *(.stab) }
156 .stabstr 0 : { *(.stabstr) }
157 .stab.excl 0 : { *(.stab.excl) }
158 .stab.exclstr 0 : { *(.stab.exclstr) }
159 .stab.index 0 : { *(.stab.index) }
160 .stab.indexstr 0 : { *(.stab.indexstr) }
161
162 .comment 0 : { *(.comment) }
163
164 /* DWARF debug sections.
165 Symbols in the DWARF debugging sections are relative to the beginning
166 of the section so we begin them at 0. */
167
168 /* DWARF 1 */
169 .debug 0 : { *(.debug) }
170 .line 0 : { *(.line) }
171
172 /* GNU DWARF 1 extensions */
173 .debug_srcinfo 0 : { *(.debug_srcinfo) }
174 .debug_sfnames 0 : { *(.debug_sfnames) }
175
176 /* DWARF 1.1 and DWARF 2 */
177 .debug_aranges 0 : { *(.debug_aranges) }
178 .debug_pubnames 0 : { *(.debug_pubnames) }
179
180 /* DWARF 2 */
181 .debug_info 0 : { *(.debug_info) }
182 .debug_abbrev 0 : { *(.debug_abbrev) }
183 .debug_line 0 : { *(.debug_line) }
184 .debug_frame 0 : { *(.debug_frame) }
185 .debug_str 0 : { *(.debug_str) }
186 .debug_loc 0 : { *(.debug_loc) }
187 .debug_macinfo 0 : { *(.debug_macinfo) }
188
189 PROVIDE (__stack = ${STACK_START_ADDR});
190}
191EOF
192
193
194
195