Add configurability to d30v
[deliverable/binutils-gdb.git] / ld / scripttempl / elfd30v.sc
1 cat <<EOF
2 OUTPUT_FORMAT("${OUTPUT_FORMAT}")
3 OUTPUT_ARCH(${ARCH})
4
5 MEMORY
6 {
7 text : ORIGIN = ${TEXT_START_ADDR}, LENGTH = ${TEXT_SIZE}
8 data : ORIGIN = ${DATA_START_ADDR}, LENGTH = ${DATA_SIZE}
9 emem : ORIGIN = ${EMEM_START_ADDR}, LENGTH = ${EMEM_SIZE}
10 }
11
12 SECTIONS
13 {
14 /* Internal text space */
15 .stext ${RELOCATING-0} :
16 {
17 ${RELOCATING+ PROVIDE (__stext_start = .) ; }
18 *(.stext)
19 ${RELOCATING+ PROVIDE (__stext_end = .) ; }
20 } ${RELOCATING+ > text}
21
22 /* External memory */
23 .etext ${RELOCATING-0} :
24 {
25 ${RELOCATING+ PROVIDE (__etext_start = .) ; }
26 *(.etext)
27 ${RELOCATING+ PROVIDE (__etext_end = .) ; }
28 } ${RELOCATING+ > emem}
29
30 /* Internal text space or external memory */
31 .text :
32 {
33 ${RELOCATING+ PROVIDE (__text_start = .) ; }
34 *(.text)
35 *(.gnu.linkonce.t*)
36 *(.init)
37 *(.fini)
38 ${RELOCATING+ PROVIDE (__text_end = .) ; }
39 ${RELOCATING+ _etext = . ; }
40 } ${RELOCATING+ > ${TEXT_MEMORY}}
41
42 /* Internal data space */
43 .sdata ${RELOCATING-0} :
44 {
45 ${RELOCATING+ PROVIDE (__sdata_start = .) ; }
46 *(.sdata)
47 ${RELOCATING+ PROVIDE (__sdata_end = .) ; }
48 } ${RELOCATING+ > data}
49
50 /* External memory */
51 .edata ${RELOCATING-0} :
52 {
53 ${RELOCATING+ PROVIDE (__edata_start = .) ; }
54 *(.edata)
55 ${RELOCATING+ PROVIDE (__edata_end = .) ; }
56 } ${RELOCATING+ > emem}
57
58 /* Internal data space or external memory */
59 .strings ${RELOCATING-0} : { *(.strings) } ${RELOCATING+ > ${DATA_MEMORY}}
60 .rodata ${RELOCATING-0} : { *(.rodata) } ${RELOCATING+ > ${DATA_MEMORY}}
61 .rodata1 ${RELOCATING-0} : { *(.rodata1) } ${RELOCATING+ > ${DATA_MEMORY}}
62 .data1 ${RELOCATING-0} : { *(.data1) } ${RELOCATING+ > ${DATA_MEMORY}}
63
64 .ctors ${RELOCATING-0} :
65 {
66 ${CONSTRUCTING+${CTOR_START}}
67 *(.ctors)
68 ${CONSTRUCTING+${CTOR_END}}
69 } ${RELOCATING+ > ${DATA_MEMORY}}
70
71 .dtors ${RELOCATING-0} :
72 {
73 ${CONSTRUCTING+${DTOR_START}}
74 *(.dtors)
75 ${CONSTRUCTING+${DTOR_END}}
76 } ${RELOCATING+ > ${DATA_MEMORY}}
77
78 .data ${RELOCATING-0} :
79 {
80 *(.data)
81 *(.gnu.linkonce.d*)
82 ${CONSTRUCTING+CONSTRUCTORS}
83 ${RELOCATING+ _edata = . ; }
84 } ${RELOCATING+ > ${DATA_MEMORY}}
85
86 .sbss ${RELOCATING-0} :
87 {
88 ${RELOCATING+ PROVIDE (__sbss_start = .) ; }
89 *(.sbss)
90 ${RELOCATING+ PROVIDE (__sbss_end = .) ; }
91 } ${RELOCATING+ > data}
92
93 .ebss ${RELOCATING-0} :
94 {
95 ${RELOCATING+ PROVIDE (__ebss_start = .) ; }
96 *(.ebss)
97 ${RELOCATING+ PROVIDE (__ebss_end = .) ; }
98 } ${RELOCATING+ > data}
99
100 .bss ${RELOCATING-0} :
101 {
102 ${RELOCATING+ PROVIDE (__bss_start = .) ; }
103 *(.bss)
104 *(COMMON)
105 ${RELOCATING+ PROVIDE (__bss_end = .) ; }
106 ${RELOCATING+ _end = . ; }
107 } ${RELOCATING+ > ${DATA_MEMORY}}
108
109 /* Stabs debugging sections. */
110 .stab 0 : { *(.stab) }
111 .stabstr 0 : { *(.stabstr) }
112 .stab.excl 0 : { *(.stab.excl) }
113 .stab.exclstr 0 : { *(.stab.exclstr) }
114 .stab.index 0 : { *(.stab.index) }
115 .stab.indexstr 0 : { *(.stab.indexstr) }
116
117 .comment 0 : { *(.comment) }
118
119 /* DWARF debug sections.
120 Symbols in the DWARF debugging sections are relative to the beginning
121 of the section so we begin them at 0. */
122
123 /* DWARF 1 */
124 .debug 0 : { *(.debug) }
125 .line 0 : { *(.line) }
126
127 /* GNU DWARF 1 extensions */
128 .debug_srcinfo 0 : { *(.debug_srcinfo) }
129 .debug_sfnames 0 : { *(.debug_sfnames) }
130
131 /* DWARF 1.1 and DWARF 2 */
132 .debug_aranges 0 : { *(.debug_aranges) }
133 .debug_pubnames 0 : { *(.debug_pubnames) }
134
135 /* DWARF 2 */
136 .debug_info 0 : { *(.debug_info) }
137 .debug_abbrev 0 : { *(.debug_abbrev) }
138 .debug_line 0 : { *(.debug_line) }
139 .debug_frame 0 : { *(.debug_frame) }
140 .debug_str 0 : { *(.debug_str) }
141 .debug_loc 0 : { *(.debug_loc) }
142 .debug_macinfo 0 : { *(.debug_macinfo) }
143
144 PROVIDE (__stack = ${STACK_START_ADDR});
145 }
146 EOF
147
148
149
150
This page took 0.034427 seconds and 5 git commands to generate.