Warning, /bsps/powerpc/ss555/start/linkcmds is written in an unsupported language. File is not indexed.
0001 /*
0002 * Linker command file for Intec SS555 board
0003 *
0004 * When debugging, we assume that the internal flash ROM will be replaced by
0005 * the external RAM on the SS555 board. All sections are stacked starting
0006 * at address zero. Nothing is placed in the internal RAM, since it's not
0007 * contiguous with the external SRAM when the external RAM is placed at
0008 * zero.
0009 *
0010 * For final production, we assume that the .text section will be burned
0011 * into flash ROM starting at address zero. The .data, .bss, heap, and
0012 * workspace will reside in RAM, starting at the beginning of the internal
0013 * RAM. The system startup code will configure the external RAM to begin
0014 * where the internal RAM ends, so as to make one large RAM block.
0015 */
0016
0017 OUTPUT_FORMAT("elf32-powerpc", "elf32-powerpc", "elf32-powerpc")
0018 OUTPUT_ARCH(powerpc)
0019 STARTUP(start.o)
0020 ENTRY(start)
0021 EXTERN(_vectors)
0022
0023 int_ram_org = 0x003F9800; /* base of internal RAM */
0024 int_ram_top = 0x00400000; /* top of internal RAM */
0025 ext_ram_size = 0x00080000; /* size of external RAM */
0026
0027 RamBase = DEFINED(_RamBase) ? RamBase : 0x003F9800;
0028 RamSize = DEFINED(_RamSize) ? RamSize : 0x00486800;
0029 RamEnd = RamBase + RamSize;
0030 HeapSize = DEFINED(_HeapSize) ? HeapSize : 0x0;
0031
0032 SECTIONS
0033 {
0034 .vectors 0x0:
0035 {
0036 /*
0037 * For the MPC555, we use the compressed vector table format which puts
0038 * all of the exception vectors before 0x100.
0039 */
0040 *(.vectors)
0041 }
0042
0043 .text 0x100:
0044 {
0045 /* Read-only sections, merged into text segment: */
0046
0047 text.start = .;
0048
0049 /* Entry point is the .entry section */
0050 *(.entry)
0051 *(.entry2)
0052
0053 /* Actual code */
0054 *(.text*)
0055
0056 /* C++ constructors/destructors */
0057 *(.gnu.linkonce.t*)
0058
0059 /* Initialization and finalization code.
0060 *
0061 * Various files can provide initialization and finalization functions.
0062 * The bodies of these functions are in .init and .fini sections. We
0063 * accumulate the bodies here, and prepend function prologues from
0064 * ecrti.o and function epilogues from ecrtn.o. ecrti.o must be linked
0065 * first; ecrtn.o must be linked last. Because these are wildcards, it
0066 * doesn't matter if the user does not actually link against ecrti.o and
0067 * ecrtn.o; the linker won't look for a file to match a wildcard. The
0068 * wildcard also means that it doesn't matter which directory ecrti.o
0069 * and ecrtn.o are in.
0070 */
0071 PROVIDE (_init = .);
0072 *ecrti.o(.init)
0073 *(.init)
0074 *ecrtn.o(.init)
0075
0076 PROVIDE (_fini = .);
0077 *ecrti.o(.fini)
0078 *(.fini)
0079 *ecrtn.o(.init)
0080
0081 KEEP (*ecrti.o(.ctors))
0082 KEEP (*crtbegin.o(.ctors))
0083 KEEP (*crtbegin?.o(.ctors))
0084 KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o *ecrtn.o) .ctors))
0085 KEEP (*(SORT(.ctors.*)))
0086 KEEP (*(.ctors))
0087 KEEP (*ecrti.o(.dtors))
0088 KEEP (*crtbegin.o(.dtors))
0089 KEEP (*crtbegin?.o(.dtors))
0090 KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o *ecrtn.o) .dtors))
0091 KEEP (*(SORT(.dtors.*)))
0092 KEEP (*(.dtors))
0093
0094 /*
0095 * Special FreeBSD sysctl sections.
0096 */
0097 . = ALIGN (16);
0098 __start_set_sysctl_set = .;
0099 *(set_sysctl_*);
0100 __stop_set_sysctl_set = ABSOLUTE(.);
0101 *(set_domain_*);
0102 *(set_pseudo_*);
0103
0104 /* Exception frame info */
0105 *(.eh_frame)
0106
0107 /* Miscellaneous read-only data */
0108 _rodata_start = . ;
0109 *(.gnu.linkonce.r*)
0110 *(.lit)
0111 *(.shdata)
0112 *(.rodata*)
0113 *(.rodata1)
0114 KEEP (*(SORT(.rtemsroset.*)))
0115 *(.descriptors)
0116 *(rom_ver)
0117 _erodata = .;
0118
0119 /* Various possible names for the end of the .text section */
0120 etext = ALIGN(0x10);
0121 _etext = .;
0122 _endtext = .;
0123 text.end = .;
0124 PROVIDE (etext = .);
0125 PROVIDE (__etext = .);
0126 }
0127 text.size = text.end - text.start;
0128
0129 .tdata : {
0130 _TLS_Data_begin = .;
0131 *(.tdata .tdata.* .gnu.linkonce.td.*)
0132 _TLS_Data_end = .;
0133
0134 /*
0135 * .data section contents, copied to RAM at system startup.
0136 */
0137 . = ALIGN(0x20);
0138 data.contents.start = .;
0139 }
0140 .tbss : {
0141 _TLS_BSS_begin = .;
0142 *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon)
0143 _TLS_BSS_end = .;
0144 }
0145 _TLS_Data_size = _TLS_Data_end - _TLS_Data_begin;
0146 _TLS_Data_begin = _TLS_Data_size != 0 ? _TLS_Data_begin : _TLS_BSS_begin;
0147 _TLS_Data_end = _TLS_Data_size != 0 ? _TLS_Data_end : _TLS_BSS_begin;
0148 _TLS_BSS_size = _TLS_BSS_end - _TLS_BSS_begin;
0149 _TLS_Size = _TLS_BSS_end - _TLS_Data_begin;
0150 _TLS_Alignment = MAX (ALIGNOF (.tdata), ALIGNOF (.tbss));
0151
0152 /*
0153 * If debugging, stack the read/write sections directly after the text
0154 * section. Otherwise, stack the read/write sections starting at base of
0155 * internal RAM.
0156 */
0157 . = DEFINED(RTEMS_DEBUG) ? . : int_ram_org;
0158
0159 .data : AT (data.contents.start)
0160 {
0161 data.start = .;
0162
0163 *(.data)
0164 *(.data.*)
0165 KEEP (*(SORT(.rtemsrwset.*)))
0166 *(.data1)
0167
0168 PROVIDE (__SDATA_START__ = .);
0169 *(.sdata .sdata.* .gnu.linkonce.s.*)
0170 PROVIDE (__SDATA_END__ = .);
0171
0172 PROVIDE (__EXCEPT_START__ = .);
0173 *(.gcc_except_table*)
0174 PROVIDE (__EXCEPT_END__ = .);
0175
0176 PROVIDE(__GOT_START__ = .);
0177 *(.got.plt)
0178 *(.got)
0179 PROVIDE(__GOT_END__ = .);
0180
0181 *(.got1)
0182
0183 PROVIDE (__GOT2_START__ = .);
0184 PROVIDE (_GOT2_START_ = .);
0185 *(.got2)
0186 PROVIDE (__GOT2_END__ = .);
0187 PROVIDE (_GOT2_END_ = .);
0188
0189 PROVIDE (__FIXUP_START__ = .);
0190 PROVIDE (_FIXUP_START_ = .);
0191 *(.fixup)
0192 PROVIDE (_FIXUP_END_ = .);
0193 PROVIDE (__FIXUP_END__ = .);
0194
0195 /* We want the small data sections together, so single-instruction
0196 * offsets can access them all.
0197 */
0198 PROVIDE (__SDATA2_START__ = .);
0199 bsp_section_sdata_begin = .;
0200 *(.sdata2 .sdata2.* .gnu.linkonce.s2.*)
0201 *(.sbss2 .sbss2.* .gnu.linkonce.sb2.*)
0202 PROVIDE (__SDATA2_END__ = .);
0203 bsp_section_sdata_end = .;
0204
0205 data.end = .;
0206 }
0207 data.size = data.end - data.start;
0208
0209 bss.start = .;
0210 .sbss :
0211 {
0212 PROVIDE (__sbss_start = .); PROVIDE (___sbss_start = .);
0213 bsp_section_sbss_begin = .;
0214 *(.dynsbss)
0215 *(.sbss .sbss.* .gnu.linkonce.sb.*)
0216 *(.scommon)
0217 PROVIDE (__sbss_end = .); PROVIDE (___sbss_end = .);
0218 bsp_section_sbss_end = .;
0219 bsp_section_sdata_libdl_begin = .;
0220 . = DEFINED(bsp_section_small_data_area_size) ?
0221 bsp_section_sdata_begin + bsp_section_small_data_area_size : .;
0222 bsp_section_sdata_libdl_end = .;
0223 }
0224 .bss :
0225 {
0226 *(.dynbss)
0227 *(.bss .bss* .gnu.linkonce.b*)
0228 *(COMMON)
0229 . = ALIGN(4);
0230 }
0231 bss.end = .;
0232 bss.size = bss.end - bss.start;
0233
0234 PROVIDE(_end = bss.end);
0235
0236 .noinit (NOLOAD) : {
0237 *(SORT_BY_NAME (SORT_BY_ALIGNMENT (.noinit*)))
0238 }
0239
0240 .rtemsstack (NOLOAD) : {
0241 *(SORT(.rtemsstack.*))
0242 }
0243
0244 /*
0245 * Work Area
0246 *
0247 * The Work Area is configured at run-time to use all available memory. It
0248 * begins just after the end of the Workspace and continues to the end of
0249 * the external RAM.
0250 */
0251 . = DEFINED(RTEMS_DEBUG) ? 0 + ext_ram_size : int_ram_top + ext_ram_size;
0252 WorkAreaBase = .;
0253
0254
0255 /*
0256 * Internal I/O devices
0257 */
0258 .usiu 0x002FC000: /* unified system interface unit */
0259 {
0260 usiu = .;
0261 }
0262
0263 .imb 0x00300000: /* inter-module bus and devices */
0264 {
0265 imb = .;
0266 }
0267
0268 .sram 0x00380000: /* internal SRAM control registers */
0269 {
0270 sram = .;
0271 }
0272
0273 /*
0274 * SS555 external devices managed by on-board CPLD
0275 */
0276 .cpld 0xFF000000: /* SS555 external CPLD devices */
0277 {
0278 cpld = .;
0279 }
0280
0281
0282 /* Stabs debugging sections. */
0283 .stab 0 : { *(.stab) }
0284 .stabstr 0 : { *(.stabstr) }
0285 .stab.excl 0 : { *(.stab.excl) }
0286 .stab.exclstr 0 : { *(.stab.exclstr) }
0287 .stab.index 0 : { *(.stab.index) }
0288 .stab.indexstr 0 : { *(.stab.indexstr) }
0289 .comment 0 : { *(.comment) }
0290
0291 /* DWARF debug sections.
0292 Symbols in the DWARF debugging sections are relative to the beginning
0293 of the section so we begin them at 0. */
0294 /* DWARF 1 */
0295 .debug 0 : { *(.debug) }
0296 .line 0 : { *(.line) }
0297
0298 /* GNU DWARF 1 extensions */
0299 .debug_srcinfo 0 : { *(.debug_srcinfo) }
0300 .debug_sfnames 0 : { *(.debug_sfnames) }
0301
0302 /* DWARF 1.1 and DWARF 2 */
0303 .debug_aranges 0 : { *(.debug_aranges) }
0304 .debug_pubnames 0 : { *(.debug_pubnames) }
0305
0306 /* DWARF 2 */
0307 .debug_info 0 : { *(.debug_info) }
0308 .debug_abbrev 0 : { *(.debug_abbrev) }
0309 .debug_line 0 : { *(.debug_line) }
0310 .debug_frame 0 : { *(.debug_frame) }
0311 .debug_str 0 : { *(.debug_str) }
0312 .debug_loc 0 : { *(.debug_loc) }
0313 .debug_macinfo 0 : { *(.debug_macinfo) }
0314
0315 /* SGI/MIPS DWARF 2 extensions */
0316 .debug_weaknames 0 : { *(.debug_weaknames) }
0317 .debug_funcnames 0 : { *(.debug_funcnames) }
0318 .debug_typenames 0 : { *(.debug_typenames) }
0319 .debug_varnames 0 : { *(.debug_varnames) }
0320 /* These must appear regardless of . */
0321 }