Debian Codegraph @

src/plugins/scriptedwizard/resources/ppc/files/MPC5200/ld/target.ld

raw
1 OUTPUT_FORMAT("elf32-powerpc", "elf32-powerpc",
2 "elf32-powerpc")
3 OUTPUT_ARCH(powerpc)
4 ENTRY(_start)
5 /**************** USER DEFINED ********************/
6
7 MEMORY
8 {
9 vectorspace : org = 0x00000000, l = 0x2200
10 ext_rom : org = 0x00100000, l = 0x80000
11 int_cram : org = 0xFFF00000, l = 0x10000
12 ext_ram : org = 0x00180000, l = 0x80000
13 }
14
15
16 SECTIONS
17 {
18 /* Read-only sections, merged into text segment: */
19
20 .vectab :
21 {
22 *(.vectab)
23 } > vectorspace
24
25 .text :
26 {
27 *(.text)
28 /* trap and vector tables. */
29 *(.traptab)
30 *(.inttab)
31 /* C++ stuff. */
32 *(.gcc_except_table)
33 *(.eh_frame)
34 /* .gnu.warning sections are handled specially by elf32.em. */
35 *(.gnu.warning)
36 *(.gnu.linkonce.t*)
37 *(.init)
38 *(.fixup)
39 *(.got2)
40 *(.got1)
41 *(.got)
42 *(.fini)
43 } > ext_rom
44 _etext = .;
45 PROVIDE (etext = .);
46
47 .rodata :
48 {
49 *(.rodata) *(.rodata.*) *(.toc) *(.gnu.linkonce.r*)
50 /* we generate the clear table (sections to be cleared at runtime) here */
51 . = (. + 3) & -4 ;
52 __clear_table = . ;
53 LONG( 0 + ADDR(.bss) ) ; LONG( SIZEOF(.bss) );
54 LONG( 0 + ADDR(.sbss) ) ; LONG( SIZEOF(.sbss) );
55 LONG( 0 + ADDR(.sbss2) ) ; LONG( SIZEOF(.sbss2) );
56 LONG(-1) ; LONG(-1) ;
57
58 /* now the copy table ( section to be copied at runtime from load address
59 to the runtime area) */
60 __copy_table = . ;
61 LONG( 0 + LOADADDR(.sdata)); LONG(ABSOLUTE(SDATA_BASE)); LONG (SIZEOF(.sdata));
62 LONG( 0 + LOADADDR(.sdata2)); LONG(ADDR(.sdata2)); LONG (SIZEOF(.sdata2));
63 LONG( 0 + LOADADDR(.data)); LONG(ABSOLUTE(DATA_BASE)); LONG (SIZEOF(.data));
64
65 LONG(-1) ; LONG (-1) ; LONG (-1) ;
66 } > ext_rom
67
68 .rodata1 : { *(.rodata1) } > ext_rom
69
70 .ctors :
71 {
72 __CTOR_LIST__ = .;
73 PROVIDE (__CTOR_LIST__ = .);
74 *(.ctors)
75 __CTOR_END__ = .;
76 PROVIDE (__CTOR_END__ = .);
77 } > ext_rom
78 .dtors :
79 {
80 __DTOR_LIST__ = .;
81 PROVIDE (__DTOR_LIST__ = .);
82 *(.dtors)
83 __DTOR_END__ = .;
84 PROVIDE (__DTOR_END__ = .);
85 } > ext_rom
86
87 .jcr : { KEEP (*(.jcr)) } > ext_rom
88 __FLASH_END = ALIGN (8) ;
89
90
91 .sdata :
92 AT ( __FLASH_END)
93 {
94 SDATA_BASE = ABSOLUTE(.) ;
95 *(.sdata .sdata.* .gnu.linkonce.s.*)
96 } > ext_ram
97
98 .sbss :
99 {
100 __sbss_start = . ;
101 *(.dynsbss)
102 *(.sbss .sbss.* .gnu.linkonce.sb.*)
103 *(.scommon)
104 } > ext_ram
105
106 .sdata2 :
107 AT ( LOADADDR (.sdata) + SIZEOF (.sdata))
108 {
109 *(.sdata2 .sdata2.* .gnu.linkonce.s2.*)
110 } > ext_ram
111
112 .sbss2 :
113 {
114 __sbss2_start = . ;
115 *(.sbss2 .sbss2.* .gnu.linkonce.sb2.*)
116 } > ext_ram
117
118 .data :
119 AT ( LOADADDR (.sdata2) + SIZEOF (.sdata2))
120 {
121 DATA_BASE = ABSOLUTE(.) ;
122 . = ALIGN(8) ;
123 *(.data)
124 *(.data.*)
125 *(.gnu.linkonce.d*)
126 CONSTRUCTORS
127 DATA_END = ABSOLUTE(.) ;
128 } > ext_ram
129
130
131 /* we allocate the .toc section of the different moduls to .rodata */
132 .data1 ((. + 7) & -8) : { *(.data1) }
133 _edata = .;
134 PROVIDE (edata = .);
135
136 .bss :
137 {
138 PROVIDE (__bss_start = .);
139 *(.dynbss)
140 *(.bss .bss.* .gnu.linkonce.b.*)
141 __HEAP = .;
142 . += 0x8000;
143 __HEAP_END = .;
144 __USER_STACK_BOTTOM = .;
145 . += 0x1000;
146 __USER_STACK_TOP = .;
147 *(COMMON)
148 PROVIDE(__bss_end = .);
149 } > ext_ram
150 _end = . ;
151 PROVIDE (end = .);
152 /* These are needed for ELF backends which have not yet been
153 converted to the new style linker. */
154 .stab 0 : { *(.stab) }
155 .stabstr 0 : { *(.stabstr) }
156 /* DWARF debug sections.
157 Symbols in the DWARF debugging sections are relative to the beginning
158 of the section so we begin them at 0. */
159 /* DWARF 1 */
160 .debug 0 : { *(.debug) }
161 .line 0 : { *(.line) }
162 /* GNU DWARF 1 extensions */
163 .debug_srcinfo 0 : { *(.debug_srcinfo) }
164 .debug_sfnames 0 : { *(.debug_sfnames) }
165 /* DWARF 1.1 and DWARF 2 */
166 .debug_aranges 0 : { *(.debug_aranges) }
167 .debug_pubnames 0 : { *(.debug_pubnames) }
168 /* DWARF 2 */
169 .debug_info 0 : { *(.debug_info) }
170 .debug_abbrev 0 : { *(.debug_abbrev) }
171 .debug_line 0 : { *(.debug_line) }
172 .debug_frame 0 : { *(.debug_frame) }
173 .debug_str 0 : { *(.debug_str) }
174 .debug_loc 0 : { *(.debug_loc) }
175 .debug_macinfo 0 : { *(.debug_macinfo) }
176 /* SGI/MIPS DWARF 2 extensions */
177 .debug_weaknames 0 : { *(.debug_weaknames) }
178 .debug_funcnames 0 : { *(.debug_funcnames) }
179 .debug_typenames 0 : { *(.debug_typenames) }
180 .debug_varnames 0 : { *(.debug_varnames) }
181 /* These must appear regardless of . */
182 }