Warning, /bsps/moxie/moxiesim/start/linkcmds is written in an unsupported language. File is not indexed.
0001 /*
0002 * The common part of the default linker scripts for standalone
0003 * executables running on a Moxie processor.
0004 *
0005 * Copyright (C) 2008 Anthony Green
0006 *
0007 * The authors hereby grant permission to use, copy, modify,
0008 * distribute, and license this software and its documentation for any
0009 * purpose, provided that existing copyright notices are retained in
0010 * all copies and that this notice is included verbatim in any
0011 * distributions. No written agreement, license, or royalty fee is
0012 * required for any of the authorized uses. Modifications to this
0013 * software may be copyrighted by their authors and need not follow
0014 * the licensing terms described here, provided that the new terms are
0015 * clearly indicated on the first page of each file where they apply.
0016 */
0017
0018 OUTPUT_FORMAT("elf32-bigmoxie")
0019 OUTPUT_ARCH(moxie)
0020 ENTRY(_start)
0021 STARTUP(start.o)
0022
0023 RamBase = DEFINED(RamBase) ? RamBase : 0x00000000;
0024 RamSize = DEFINED(RamSize) ? RamSize : 16M;
0025 RamEnd = RamBase + RamSize;
0026 HeapSize = DEFINED(HeapSize) ? HeapSize : 0x0;
0027
0028 SECTIONS
0029 {
0030 /* Read-only sections, merged into text segment: */
0031 . = 0x00001000;
0032 .interp : { *(.interp) }
0033 .hash : { *(.hash) }
0034 .dynsym : { *(.dynsym) }
0035 .dynstr : { *(.dynstr) }
0036 .gnu.version : { *(.gnu.version) }
0037 .gnu.version_d : { *(.gnu.version_d) }
0038 .gnu.version_r : { *(.gnu.version_r) }
0039 .rel.init : { *(.rel.init) }
0040 .rela.init : { *(.rela.init) }
0041 .rel.text :
0042 {
0043 *(.rel.text)
0044 *(.rel.text.*)
0045 *(.rel.gnu.linkonce.t*)
0046 }
0047 .rela.text :
0048 {
0049 *(.rela.text)
0050 *(.rela.text.*)
0051 *(.rela.gnu.linkonce.t*)
0052 }
0053 .rel.fini : { *(.rel.fini) }
0054 .rela.fini : { *(.rela.fini) }
0055 .rel.rodata :
0056 {
0057 *(.rel.rodata)
0058 *(.rel.rodata.*)
0059 *(.rel.gnu.linkonce.r*)
0060 }
0061 .rela.rodata :
0062 {
0063 *(.rela.rodata)
0064 *(.rela.rodata.*)
0065 *(.rela.gnu.linkonce.r*)
0066 }
0067 .rel.data :
0068 {
0069 *(.rel.data)
0070 *(.rel.data.*)
0071 *(.rel.gnu.linkonce.d*)
0072 }
0073 .rela.data :
0074 {
0075 *(.rela.data)
0076 *(.rela.data.*)
0077 *(.rela.gnu.linkonce.d*)
0078 }
0079 .rel.ctors : { *(.rel.ctors) }
0080 .rela.ctors : { *(.rela.ctors) }
0081 .rel.dtors : { *(.rel.dtors) }
0082 .rela.dtors : { *(.rela.dtors) }
0083 .rel.got : { *(.rel.got) }
0084 .rela.got : { *(.rela.got) }
0085 .rel.sdata :
0086 {
0087 *(.rel.sdata)
0088 *(.rel.sdata.*)
0089 *(.rel.gnu.linkonce.s*)
0090 }
0091 .rela.sdata :
0092 {
0093 *(.rela.sdata)
0094 *(.rela.sdata.*)
0095 *(.rela.gnu.linkonce.s*)
0096 }
0097 .rel.sbss : { *(.rel.sbss) }
0098 .rela.sbss : { *(.rela.sbss) }
0099 .rel.bss : { *(.rel.bss) }
0100 .rela.bss : { *(.rela.bss) }
0101 .rel.plt : { *(.rel.plt) }
0102 .rela.plt : { *(.rela.plt) }
0103 .plt : { *(.plt) }
0104 .text :
0105 {
0106 *(.text)
0107 *(.text.*)
0108 *(.stub)
0109
0110 /*
0111 * Special FreeBSD sysctl sections.
0112 */
0113 . = ALIGN (16);
0114 __start_set_sysctl_set = .;
0115 *(set_sysctl_*);
0116 __stop_set_sysctl_set = ABSOLUTE(.);
0117 *(set_domain_*);
0118 *(set_pseudo_*);
0119
0120 /* .gnu.warning sections are handled specially by elf32.em. */
0121 *(.gnu.warning)
0122 *(.gnu.linkonce.t*)
0123 *(.glue_7t) *(.glue_7)
0124 } =0
0125 .init :
0126 {
0127 KEEP (*(.init))
0128 } =0
0129 _etext = .;
0130 PROVIDE (etext = .);
0131 .fini :
0132 {
0133 KEEP (*(.fini))
0134 } =0
0135 .rodata : { *(.rodata) *(.rodata.*) KEEP (*(SORT(.rtemsroset.*))) *(.gnu.linkonce.r*) }
0136 .rodata1 : { *(.rodata1) }
0137 .tdata : {
0138 _TLS_Data_begin = .;
0139 *(.tdata .tdata.* .gnu.linkonce.td.*)
0140 _TLS_Data_end = .;
0141 }
0142 .tbss : {
0143 _TLS_BSS_begin = .;
0144 *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon)
0145 _TLS_BSS_end = .;
0146 }
0147 _TLS_Data_size = _TLS_Data_end - _TLS_Data_begin;
0148 _TLS_Data_begin = _TLS_Data_size != 0 ? _TLS_Data_begin : _TLS_BSS_begin;
0149 _TLS_Data_end = _TLS_Data_size != 0 ? _TLS_Data_end : _TLS_BSS_begin;
0150 _TLS_BSS_size = _TLS_BSS_end - _TLS_BSS_begin;
0151 _TLS_Size = _TLS_BSS_end - _TLS_Data_begin;
0152 _TLS_Alignment = MAX (ALIGNOF (.tdata), ALIGNOF (.tbss));
0153 .eh_frame_hdr : { *(.eh_frame_hdr) }
0154 /* Adjust the address for the data segment. We want to adjust up to
0155 the same address within the page on the next page up. */
0156 . = ALIGN(256) + (. & (256 - 1));
0157 .data :
0158 {
0159 *(.data)
0160 *(.data.*)
0161 KEEP (*(SORT(.rtemsrwset.*)))
0162 *(.gnu.linkonce.d*)
0163 SORT(CONSTRUCTORS)
0164 }
0165 .data1 : { *(.data1) }
0166 .eh_frame : { KEEP (*(.eh_frame)) }
0167 .gcc_except_table : { *(.gcc_except_table) }
0168 .ctors :
0169 {
0170 /* gcc uses crtbegin.o to find the start of
0171 the constructors, so we make sure it is
0172 first. Because this is a wildcard, it
0173 doesn't matter if the user does not
0174 actually link against crtbegin.o; the
0175 linker won't look for a file to match a
0176 wildcard. The wildcard also means that it
0177 doesn't matter which directory crtbegin.o
0178 is in. */
0179 KEEP (*crtbegin.o(.ctors))
0180 /* We don't want to include the .ctor section from
0181 from the crtend.o file until after the sorted ctors.
0182 The .ctor section from the crtend file contains the
0183 end of ctors marker and it must be last */
0184 KEEP (*(EXCLUDE_FILE (*crtend.o ) .ctors))
0185 KEEP (*(SORT(.ctors.*)))
0186 KEEP (*(.ctors))
0187 }
0188 .dtors :
0189 {
0190 KEEP (*crtbegin.o(.dtors))
0191 KEEP (*(EXCLUDE_FILE (*crtend.o ) .dtors))
0192 KEEP (*(SORT(.dtors.*)))
0193 KEEP (*(.dtors))
0194 }
0195 .jcr : { KEEP (*(.jcr)) }
0196 .got : { *(.got.plt) *(.got) }
0197 .dynamic : { *(.dynamic) }
0198 /* We want the small data sections together, so single-instruction offsets
0199 can access them all, and initialized data all before uninitialized, so
0200 we can shorten the on-disk segment size. */
0201 .sdata :
0202 {
0203 *(.sdata)
0204 *(.sdata.*)
0205 *(.gnu.linkonce.s.*)
0206 }
0207 _edata = .;
0208 PROVIDE (edata = .);
0209 __bss_start = .;
0210 __bss_start__ = .;
0211 .sbss :
0212 {
0213 *(.dynsbss)
0214 *(.sbss)
0215 *(.sbss.*)
0216 *(.scommon)
0217 }
0218 .bss :
0219 {
0220 *(.dynbss)
0221 *(.bss)
0222 *(.bss.*)
0223 *(COMMON)
0224 /* Align here to ensure that the .bss section occupies space up to
0225 _end. Align after .bss to ensure correct alignment even if the
0226 .bss section disappears because there are no input sections. */
0227 . = ALIGN(32 / 8);
0228 }
0229 . = ALIGN(32 / 8);
0230 _end = .;
0231 _bss_end__ = . ; __bss_end__ = . ; __end__ = . ;
0232 PROVIDE (end = .);
0233 .noinit (NOLOAD) : {
0234 *(SORT_BY_NAME (SORT_BY_ALIGNMENT (.noinit*)))
0235 }
0236 .rtemsstack (NOLOAD) : {
0237 *(SORT(.rtemsstack.*))
0238 }
0239 WorkAreaBase = .;
0240 /* Stabs debugging sections. */
0241 .stab 0 : { *(.stab) }
0242 .stabstr 0 : { *(.stabstr) }
0243 .stab.excl 0 : { *(.stab.excl) }
0244 .stab.exclstr 0 : { *(.stab.exclstr) }
0245 .stab.index 0 : { *(.stab.index) }
0246 .stab.indexstr 0 : { *(.stab.indexstr) }
0247 .comment 0 : { *(.comment) }
0248 /* DWARF debug sections.
0249 Symbols in the DWARF debugging sections are relative to the beginning
0250 of the section so we begin them at 0. */
0251 /* DWARF 1 */
0252 .debug 0 : { *(.debug) }
0253 .line 0 : { *(.line) }
0254 /* GNU DWARF 1 extensions */
0255 .debug_srcinfo 0 : { *(.debug_srcinfo) }
0256 .debug_sfnames 0 : { *(.debug_sfnames) }
0257 /* DWARF 1.1 and DWARF 2 */
0258 .debug_aranges 0 : { *(.debug_aranges) }
0259 .debug_pubnames 0 : { *(.debug_pubnames) }
0260 /* DWARF 2 */
0261 .debug_info 0 : { *(.debug_info) }
0262 .debug_abbrev 0 : { *(.debug_abbrev) }
0263 .debug_line 0 : { *(.debug_line) }
0264 .debug_frame 0 : { *(.debug_frame) }
0265 .debug_str 0 : { *(.debug_str) }
0266 .debug_loc 0 : { *(.debug_loc) }
0267 .debug_macinfo 0 : { *(.debug_macinfo) }
0268 .debug_ranges 0 : { *(.debug_ranges) }
0269 /* SGI/MIPS DWARF 2 extensions */
0270 .debug_weaknames 0 : { *(.debug_weaknames) }
0271 .debug_funcnames 0 : { *(.debug_funcnames) }
0272 .debug_typenames 0 : { *(.debug_typenames) }
0273 .debug_varnames 0 : { *(.debug_varnames) }
0274 /* These must appear regardless of . */
0275
0276 /* Addition to let linker know about custom section for GDB pretty-printing support. */
0277 .debug_gdb_scripts 0 : { *(.debug_gdb_scripts) }
0278 }