Warning, /bsps/powerpc/gen5200/start/linkcmds.gen5200_base is written in an unsupported language. File is not indexed.
0001 /**
0002 * @file
0003 *
0004 * Derived from internal linker script of GNU ld (GNU Binutils) 2.18 for elf32ppc emulation.
0005 */
0006
0007 OUTPUT_FORMAT ("elf32-powerpc", "elf32-powerpc", "elf32-powerpc")
0008 OUTPUT_ARCH (powerpc)
0009 ENTRY (start)
0010 STARTUP (start.o)
0011
0012 bsp_ram_start = ORIGIN (RAM);
0013 bsp_ram_end = ORIGIN (RAM) + LENGTH (RAM);
0014 bsp_ram_size = LENGTH (RAM);
0015
0016 bsp_rom_start = ORIGIN (ROM);
0017 bsp_rom_end = ORIGIN (ROM) + LENGTH (ROM);
0018 bsp_rom_size = LENGTH (ROM);
0019
0020 bsp_dpram_start = ORIGIN (DPRAM);
0021 bsp_dpram_end = ORIGIN (DPRAM) + LENGTH (DPRAM);
0022 bsp_dpram_size = LENGTH (DPRAM);
0023
0024 bsp_section_align = 32;
0025
0026 RamBase = bsp_ram_start;
0027 RamSize = bsp_ram_size;
0028 RamEnd = RamBase + RamSize;
0029 HeapSize = DEFINED(HeapSize) ? HeapSize : 0x0;
0030
0031 /*
0032 * The upper layer linker command file may optionally define the symbol
0033 * bsp_section_small_data_area_size. By default, the small data area is
0034 * defined by the .sdata and .sbss input sections. Define
0035 * bsp_section_small_data_area_size, if you want to make space available for
0036 * dynamically loaded libraries (libdl). Small memory targets which do not use
0037 * libdl, should not define this symbol.
0038 */
0039
0040 MEMORY {
0041 UNEXPECTED_SECTIONS : ORIGIN = 0xffffffff, LENGTH = 0
0042 }
0043
0044 SECTIONS {
0045 /*
0046 * BSP: MPC5200 registers
0047 */
0048 .regs (NOLOAD) : {
0049 MBAR = .;
0050 mpc5200 = .;
0051 } > REGS
0052
0053 /*
0054 * BSP: Exception vectors
0055 */
0056 .vectors 0x100 : {
0057 *(.vectors)
0058 } > RAM
0059
0060 /*
0061 * BSP: The initial stack will live in this area - between the vectors
0062 * and the text section.
0063 */
0064
0065 .text 0x10000 : {
0066 /*
0067 * BSP: Start of text section
0068 */
0069 bsp_section_text_start = .;
0070
0071 /*
0072 * BSP: System startup entry
0073 */
0074 KEEP (*(.entry))
0075
0076 /*
0077 * BSP: Moved into .text from .init
0078 */
0079 KEEP (*(.init))
0080
0081 *(.text .stub .text.* .gnu.linkonce.t.*)
0082 KEEP (*(.text.*personality*))
0083 /* .gnu.warning sections are handled specially by elf32.em. */
0084 *(.gnu.warning)
0085 *(.glink)
0086
0087 /*
0088 * BSP: Special FreeBSD sysctl sections
0089 */
0090 . = ALIGN (16);
0091 __start_set_sysctl_set = .;
0092 *(set_sysctl_*);
0093 __stop_set_sysctl_set = ABSOLUTE(.);
0094 *(set_domain_*);
0095 *(set_pseudo_*);
0096
0097 /*
0098 * BSP: Moved into .text from .*
0099 */
0100 *(.rodata .rodata.* .gnu.linkonce.r.*)
0101 KEEP (*(SORT(.rtemsroset.*)))
0102 *(.rodata1)
0103 *(.interp)
0104 *(.note.gnu.build-id)
0105 *(.hash)
0106 *(.gnu.hash)
0107 *(.dynsym)
0108 *(.dynstr)
0109 *(.gnu.version)
0110 *(.gnu.version_d)
0111 *(.gnu.version_r)
0112 *(.eh_frame_hdr)
0113
0114 /*
0115 * BSP: Magic PPC stuff
0116 */
0117 *(.PPC.*)
0118
0119 /*
0120 * BSP: Required by cpukit/score/src/threadhandler.c
0121 */
0122 PROVIDE (_fini = .);
0123
0124 /*
0125 * BSP: Moved into .text from .fini
0126 */
0127 KEEP (*(.fini))
0128
0129 . = ALIGN (bsp_section_align);
0130
0131 PROVIDE (__etext = .);
0132 PROVIDE (_etext = .);
0133 PROVIDE (etext = .);
0134 } > RAM
0135
0136 .tdata : {
0137 _TLS_Data_begin = .;
0138 *(.tdata .tdata.* .gnu.linkonce.td.*)
0139 _TLS_Data_end = .;
0140 } > RAM
0141 .tbss : {
0142 _TLS_BSS_begin = .;
0143 *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon)
0144 _TLS_BSS_end = .;
0145 } > RAM
0146 _TLS_Data_size = _TLS_Data_end - _TLS_Data_begin;
0147 _TLS_Data_begin = _TLS_Data_size != 0 ? _TLS_Data_begin : _TLS_BSS_begin;
0148 _TLS_Data_end = _TLS_Data_size != 0 ? _TLS_Data_end : _TLS_BSS_begin;
0149 _TLS_BSS_size = _TLS_BSS_end - _TLS_BSS_begin;
0150 _TLS_Size = _TLS_BSS_end - _TLS_Data_begin;
0151 _TLS_Alignment = MAX (ALIGNOF (.tdata), ALIGNOF (.tbss));
0152
0153 .sdata2 : {
0154 PROVIDE (_SDA2_BASE_ = 32768);
0155
0156 *(.sdata2 .sdata2.* .gnu.linkonce.s2.*)
0157
0158 . = ALIGN (bsp_section_align);
0159 } > RAM
0160
0161 .sbss2 : {
0162 *(.sbss2 .sbss2.* .gnu.linkonce.sb2.*)
0163
0164 . = ALIGN (bsp_section_align);
0165
0166 /*
0167 * BSP: End of text section
0168 */
0169 bsp_section_text_end = .;
0170 } > RAM
0171
0172 .data : {
0173 /*
0174 * BSP: Start of data section
0175 */
0176 bsp_section_data_start = .;
0177
0178 /*
0179 * BSP: Moved into .data from .ctors
0180 */
0181 KEEP (*ecrti.o(.ctors))
0182 KEEP (*crtbegin.o(.ctors))
0183 KEEP (*crtbegin?.o(.ctors))
0184 KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o *ecrtn.o) .ctors))
0185 KEEP (*(SORT(.ctors.*)))
0186 KEEP (*(.ctors))
0187
0188 /*
0189 * BSP: Moved into .data from .dtors
0190 */
0191 KEEP (*ecrti.o(.dtors))
0192 KEEP (*crtbegin.o(.dtors))
0193 KEEP (*crtbegin?.o(.dtors))
0194 KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o *ecrtn.o) .dtors))
0195 KEEP (*(SORT(.dtors.*)))
0196 KEEP (*(.dtors))
0197
0198 /*
0199 * BSP: Moved into .data from .*
0200 */
0201 *(.tdata .tdata.* .gnu.linkonce.td.*)
0202 *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon)
0203 *(.data1)
0204 KEEP (*(.eh_frame))
0205 *(.gcc_except_table .gcc_except_table.*)
0206 KEEP (*(.jcr))
0207 *(.data.rel.ro.local* .gnu.linkonce.d.rel.ro.local.*) *(.data.rel.ro .data.rel.ro.* .gnu.linkonce.d.rel.ro.*)
0208 *(.fixup)
0209 *(.got1)
0210 *(.got2)
0211 *(.dynamic)
0212 *(.got)
0213 *(.plt)
0214 PROVIDE_HIDDEN (__preinit_array_start = .);
0215 KEEP (*(.preinit_array))
0216 PROVIDE_HIDDEN (__preinit_array_end = .);
0217 PROVIDE_HIDDEN (__init_array_start = .);
0218 KEEP (*(SORT(.init_array.*)))
0219 KEEP (*(.init_array))
0220 PROVIDE_HIDDEN (__init_array_end = .);
0221 PROVIDE_HIDDEN (__fini_array_start = .);
0222 KEEP (*(.fini_array))
0223 KEEP (*(SORT(.fini_array.*)))
0224 PROVIDE_HIDDEN (__fini_array_end = .);
0225
0226 *(.data .data.* .gnu.linkonce.d.*)
0227 KEEP (*(SORT(.rtemsrwset.*)))
0228 KEEP (*(.gnu.linkonce.d.*personality*))
0229 SORT(CONSTRUCTORS)
0230
0231 . = ALIGN (bsp_section_align);
0232 } > RAM
0233
0234 .sdata : {
0235 bsp_section_sdata_begin = .;
0236 PROVIDE (_SDA_BASE_ = 32768);
0237 *(.sdata .sdata.* .gnu.linkonce.s.*)
0238
0239 . = ALIGN (bsp_section_align);
0240
0241 _edata = .;
0242 PROVIDE (edata = .);
0243
0244 /*
0245 * BSP: End of data section
0246 */
0247 bsp_section_data_end = .;
0248 bsp_section_sdata_end = .;
0249 } > RAM
0250
0251 .sbss : {
0252 /*
0253 * BSP: Start of bss section
0254 */
0255 bsp_section_sbss_begin = .;
0256
0257 __bss_start = .;
0258
0259 PROVIDE (__sbss_start = .); PROVIDE (___sbss_start = .);
0260 *(.scommon)
0261 *(.dynsbss)
0262 *(.sbss .sbss.* .gnu.linkonce.sb.*)
0263 PROVIDE (__sbss_end = .); PROVIDE (___sbss_end = .);
0264 bsp_section_sbss_end = .;
0265 bsp_section_sdata_libdl_begin = .;
0266 . = DEFINED(bsp_section_small_data_area_size) ?
0267 bsp_section_sdata_begin + bsp_section_small_data_area_size : .;
0268 bsp_section_sdata_libdl_end = .;
0269
0270 . = ALIGN (bsp_section_align);
0271 } > RAM
0272
0273 .bss : {
0274 bsp_section_bss_start = .;
0275 *(COMMON)
0276 *(.dynbss)
0277 *(.bss .bss.* .gnu.linkonce.b.*)
0278
0279 . = ALIGN (bsp_section_align);
0280
0281 __end = .;
0282 _end = .;
0283 PROVIDE (end = .);
0284
0285 /*
0286 * BSP: End of bss section
0287 */
0288 bsp_section_bss_end = .;
0289 } > RAM
0290
0291 /*
0292 * BSP: Section sizes
0293 */
0294 bsp_section_text_size = bsp_section_text_end - bsp_section_text_start;
0295 bsp_section_data_size = bsp_section_data_end - bsp_section_data_start;
0296 bsp_section_bss_size = bsp_section_bss_end - bsp_section_bss_start;
0297
0298 .noinit (NOLOAD) : {
0299 *(SORT_BY_NAME (SORT_BY_ALIGNMENT (.noinit*)))
0300 } > RAM
0301
0302 .rtemsstack (NOLOAD) : {
0303 *(SORT(.rtemsstack.*))
0304 } > RAM
0305
0306 /*
0307 * BSP: Work area start
0308 */
0309 bsp_work_area_start = .;
0310 WorkAreaBase = bsp_work_area_start;
0311
0312 /* Stabs debugging sections. */
0313 .stab 0 : { *(.stab) }
0314 .stabstr 0 : { *(.stabstr) }
0315 .stab.excl 0 : { *(.stab.excl) }
0316 .stab.exclstr 0 : { *(.stab.exclstr) }
0317 .stab.index 0 : { *(.stab.index) }
0318 .stab.indexstr 0 : { *(.stab.indexstr) }
0319 .comment 0 : { *(.comment) }
0320 /* DWARF debug sections.
0321 Symbols in the DWARF debugging sections are relative to the beginning
0322 of the section so we begin them at 0. */
0323 /* DWARF 1. */
0324 .debug 0 : { *(.debug) }
0325 .line 0 : { *(.line) }
0326 /* GNU DWARF 1 extensions. */
0327 .debug_srcinfo 0 : { *(.debug_srcinfo) }
0328 .debug_sfnames 0 : { *(.debug_sfnames) }
0329 /* DWARF 1.1 and DWARF 2. */
0330 .debug_aranges 0 : { *(.debug_aranges) }
0331 .debug_pubnames 0 : { *(.debug_pubnames) }
0332 /* DWARF 2. */
0333 .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
0334 .debug_abbrev 0 : { *(.debug_abbrev) }
0335 .debug_line 0 : { *(.debug_line .debug_line.* .debug_line_end) }
0336 .debug_frame 0 : { *(.debug_frame) }
0337 .debug_str 0 : { *(.debug_str) }
0338 .debug_loc 0 : { *(.debug_loc) }
0339 .debug_macinfo 0 : { *(.debug_macinfo) }
0340 /* SGI/MIPS DWARF 2 extensions. */
0341 .debug_weaknames 0 : { *(.debug_weaknames) }
0342 .debug_funcnames 0 : { *(.debug_funcnames) }
0343 .debug_typenames 0 : { *(.debug_typenames) }
0344 .debug_varnames 0 : { *(.debug_varnames) }
0345 /* DWARF 3. */
0346 .debug_pubtypes 0 : { *(.debug_pubtypes) }
0347 .debug_ranges 0 : { *(.debug_ranges) }
0348 /* DWARF 5. */
0349 .debug_addr 0 : { *(.debug_addr) }
0350 .debug_line_str 0 : { *(.debug_line_str) }
0351 .debug_loclists 0 : { *(.debug_loclists) }
0352 .debug_macro 0 : { *(.debug_macro) }
0353 .debug_names 0 : { *(.debug_names) }
0354 .debug_rnglists 0 : { *(.debug_rnglists) }
0355 .debug_str_offsets 0 : { *(.debug_str_offsets) }
0356 .debug_sup 0 : { *(.debug_sup) }
0357 .gnu.attributes 0 : { KEEP (*(.gnu.attributes)) }
0358
0359 /* Addition to let linker know about custom section for GDB pretty-printing support. */
0360 .debug_gdb_scripts 0 : { *(.debug_gdb_scripts) }
0361
0362 /DISCARD/ : {
0363 *(.note.GNU-stack) *(.gnu_debuglink)
0364 }
0365
0366 /*
0367 * This is a RTEMS specific section to catch all unexpected input
0368 * sections. In case you get an error like
0369 * "section `.unexpected_sections' will not fit in region
0370 * `UNEXPECTED_SECTIONS'"
0371 * you have to figure out the offending input section and add it to the
0372 * appropriate output section definition above.
0373 */
0374 .unexpected_sections : { *(*) } > UNEXPECTED_SECTIONS
0375 }