source: rtems/bsps/moxie/moxiesim/start/linkcmds @ adb85dd

5
Last change on this file since adb85dd was 9964895, checked in by Sebastian Huber <sebastian.huber@…>, on 04/20/18 at 08:35:35

bsps: Move startup files to bsps

Adjust build support files to new directory layout.

This patch is a part of the BSP source reorganization.

Update #3285.

  • Property mode set to 100644
File size: 7.6 KB
Line 
1/*
2 * The common part of the default linker scripts for standalone
3 * executables running on a Moxie processor.
4 *
5 * Copyright (C) 2008 Anthony Green
6 *
7 * The authors hereby grant permission to use, copy, modify,
8 * distribute, and license this software and its documentation for any
9 * purpose, provided that existing copyright notices are retained in
10 * all copies and that this notice is included verbatim in any
11 * distributions. No written agreement, license, or royalty fee is
12 * required for any of the authorized uses. Modifications to this
13 * software may be copyrighted by their authors and need not follow
14 * the licensing terms described here, provided that the new terms are
15 * clearly indicated on the first page of each file where they apply.
16 */
17
18OUTPUT_FORMAT("elf32-bigmoxie")
19OUTPUT_ARCH(moxie)
20ENTRY(_start)
21STARTUP(start.o)
22
23RamBase = DEFINED(RamBase) ? RamBase : 0x00000000;
24RamSize = DEFINED(RamSize) ? RamSize : 16M;
25HeapSize = DEFINED(HeapSize) ? HeapSize : 0x0;
26
27SECTIONS
28{
29  /* Read-only sections, merged into text segment: */
30  . = 0x00001000;
31  .interp     : { *(.interp)    }
32  .hash          : { *(.hash)           }
33  .dynsym        : { *(.dynsym)         }
34  .dynstr        : { *(.dynstr)         }
35  .gnu.version   : { *(.gnu.version)    }
36  .gnu.version_d   : { *(.gnu.version_d)        }
37  .gnu.version_r   : { *(.gnu.version_r)        }
38  .rel.init      : { *(.rel.init)       }
39  .rela.init     : { *(.rela.init)      }
40  .rel.text      :
41    {
42      *(.rel.text)
43      *(.rel.text.*)
44      *(.rel.gnu.linkonce.t*)
45    }
46  .rela.text     :
47    {
48      *(.rela.text)
49      *(.rela.text.*)
50      *(.rela.gnu.linkonce.t*)
51    }
52  .rel.fini      : { *(.rel.fini)       }
53  .rela.fini     : { *(.rela.fini)      }
54  .rel.rodata    :
55    {
56      *(.rel.rodata)
57      *(.rel.rodata.*)
58      *(.rel.gnu.linkonce.r*)
59    }
60  .rela.rodata   :
61    {
62      *(.rela.rodata)
63      *(.rela.rodata.*)
64      *(.rela.gnu.linkonce.r*)
65    }
66  .rel.data      :
67    {
68      *(.rel.data)
69      *(.rel.data.*)
70      *(.rel.gnu.linkonce.d*)
71    }
72  .rela.data     :
73    {
74      *(.rela.data)
75      *(.rela.data.*)
76      *(.rela.gnu.linkonce.d*)
77    }
78  .rel.ctors     : { *(.rel.ctors)      }
79  .rela.ctors    : { *(.rela.ctors)     }
80  .rel.dtors     : { *(.rel.dtors)      }
81  .rela.dtors    : { *(.rela.dtors)     }
82  .rel.got       : { *(.rel.got)                }
83  .rela.got      : { *(.rela.got)               }
84  .rel.sdata     :
85    {
86      *(.rel.sdata)
87      *(.rel.sdata.*)
88      *(.rel.gnu.linkonce.s*)
89    }
90  .rela.sdata     :
91    {
92      *(.rela.sdata)
93      *(.rela.sdata.*)
94      *(.rela.gnu.linkonce.s*)
95    }
96  .rel.sbss      : { *(.rel.sbss)               }
97  .rela.sbss     : { *(.rela.sbss)      }
98  .rel.bss       : { *(.rel.bss)                }
99  .rela.bss      : { *(.rela.bss)               }
100  .rel.plt       : { *(.rel.plt)                }
101  .rela.plt      : { *(.rela.plt)               }
102  .plt      : { *(.plt) }
103  .text      :
104  {
105    *(.text)
106    *(.text.*)
107    *(.stub)
108
109    /*
110     * Special FreeBSD sysctl sections.
111     */
112    . = ALIGN (16);
113    __start_set_sysctl_set = .;
114    *(set_sysctl_*);
115    __stop_set_sysctl_set = ABSOLUTE(.);
116    *(set_domain_*);
117    *(set_pseudo_*);
118
119    /* .gnu.warning sections are handled specially by elf32.em.  */
120    *(.gnu.warning)
121    *(.gnu.linkonce.t*)
122    *(.glue_7t) *(.glue_7)
123  } =0
124  .init          :
125  {
126    KEEP (*(.init))
127  } =0
128  _etext = .;
129  PROVIDE (etext = .);
130  .fini      :
131  {
132    KEEP (*(.fini))
133  } =0
134  .rodata   : { *(.rodata) *(.rodata.*) KEEP (*(SORT(.rtemsroset.*))) *(.gnu.linkonce.r*) }
135  .rodata1   : { *(.rodata1) }
136  .tdata : {
137    _TLS_Data_begin = .;
138    *(.tdata .tdata.* .gnu.linkonce.td.*)
139    _TLS_Data_end = .;
140  }
141  .tbss : {
142    _TLS_BSS_begin = .;
143    *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon)
144    _TLS_BSS_end = .;
145  }
146  _TLS_Data_size = _TLS_Data_end - _TLS_Data_begin;
147  _TLS_Data_begin = _TLS_Data_size != 0 ? _TLS_Data_begin : _TLS_BSS_begin;
148  _TLS_Data_end = _TLS_Data_size != 0 ? _TLS_Data_end : _TLS_BSS_begin;
149  _TLS_BSS_size = _TLS_BSS_end - _TLS_BSS_begin;
150  _TLS_Size = _TLS_BSS_end - _TLS_Data_begin;
151  _TLS_Alignment = MAX (ALIGNOF (.tdata), ALIGNOF (.tbss));
152  .eh_frame_hdr : { *(.eh_frame_hdr) }
153  /* Adjust the address for the data segment.  We want to adjust up to
154     the same address within the page on the next page up.  */
155  . = ALIGN(256) + (. & (256 - 1));
156  .data    :
157  {
158    *(.data)
159    *(.data.*)
160    KEEP (*(SORT(.rtemsrwset.*)))
161    *(.gnu.linkonce.d*)
162    SORT(CONSTRUCTORS)
163  }
164  .data1   : { *(.data1) }
165  .eh_frame : { KEEP (*(.eh_frame)) }
166  .gcc_except_table : { *(.gcc_except_table) }
167  .ctors   :
168  {
169    /* gcc uses crtbegin.o to find the start of
170       the constructors, so we make sure it is
171       first.  Because this is a wildcard, it
172       doesn't matter if the user does not
173       actually link against crtbegin.o; the
174       linker won't look for a file to match a
175       wildcard.  The wildcard also means that it
176       doesn't matter which directory crtbegin.o
177       is in.  */
178    KEEP (*crtbegin.o(.ctors))
179    /* We don't want to include the .ctor section from
180       from the crtend.o file until after the sorted ctors.
181       The .ctor section from the crtend file contains the
182       end of ctors marker and it must be last */
183    KEEP (*(EXCLUDE_FILE (*crtend.o ) .ctors))
184    KEEP (*(SORT(.ctors.*)))
185    KEEP (*(.ctors))
186  }
187   .dtors         :
188  {
189    KEEP (*crtbegin.o(.dtors))
190    KEEP (*(EXCLUDE_FILE (*crtend.o ) .dtors))
191    KEEP (*(SORT(.dtors.*)))
192    KEEP (*(.dtors))
193  }
194  .jcr            : { KEEP (*(.jcr)) }
195  .got           : { *(.got.plt) *(.got) }
196  .dynamic       : { *(.dynamic) }
197  /* We want the small data sections together, so single-instruction offsets
198     can access them all, and initialized data all before uninitialized, so
199     we can shorten the on-disk segment size.  */
200  .sdata     :
201  {
202    *(.sdata)
203    *(.sdata.*)
204    *(.gnu.linkonce.s.*)
205  }
206  _edata = .;
207  PROVIDE (edata = .);
208  __bss_start = .;
209  __bss_start__ = .;
210  .sbss      :
211  {
212    *(.dynsbss)
213    *(.sbss)
214    *(.sbss.*)
215    *(.scommon)
216  }
217  .bss       :
218  {
219   *(.dynbss)
220   *(.bss)
221   *(.bss.*)
222   *(COMMON)
223   /* Align here to ensure that the .bss section occupies space up to
224      _end.  Align after .bss to ensure correct alignment even if the
225      .bss section disappears because there are no input sections.  */
226   . = ALIGN(32 / 8);
227  }
228  . = ALIGN(32 / 8);
229  _end = .;
230  _bss_end__ = . ; __bss_end__ = . ; __end__ = . ;
231  PROVIDE (end = .);
232  WorkAreaBase = .;
233  /* Stabs debugging sections.  */
234  .stab 0 : { *(.stab) }
235  .stabstr 0 : { *(.stabstr) }
236  .stab.excl 0 : { *(.stab.excl) }
237  .stab.exclstr 0 : { *(.stab.exclstr) }
238  .stab.index 0 : { *(.stab.index) }
239  .stab.indexstr 0 : { *(.stab.indexstr) }
240  .comment 0 : { *(.comment) }
241  /* DWARF debug sections.
242     Symbols in the DWARF debugging sections are relative to the beginning
243     of the section so we begin them at 0.  */
244  /* DWARF 1 */
245  .debug          0 : { *(.debug) }
246  .line           0 : { *(.line) }
247  /* GNU DWARF 1 extensions */
248  .debug_srcinfo  0 : { *(.debug_srcinfo) }
249  .debug_sfnames  0 : { *(.debug_sfnames) }
250  /* DWARF 1.1 and DWARF 2 */
251  .debug_aranges  0 : { *(.debug_aranges) }
252  .debug_pubnames 0 : { *(.debug_pubnames) }
253  /* DWARF 2 */
254  .debug_info     0 : { *(.debug_info) }
255  .debug_abbrev   0 : { *(.debug_abbrev) }
256  .debug_line     0 : { *(.debug_line) }
257  .debug_frame    0 : { *(.debug_frame) }
258  .debug_str      0 : { *(.debug_str) }
259  .debug_loc      0 : { *(.debug_loc) }
260  .debug_macinfo  0 : { *(.debug_macinfo) }
261  .debug_ranges   0 : { *(.debug_ranges) }
262  /* SGI/MIPS DWARF 2 extensions */
263  .debug_weaknames 0 : { *(.debug_weaknames) }
264  .debug_funcnames 0 : { *(.debug_funcnames) }
265  .debug_typenames 0 : { *(.debug_typenames) }
266  .debug_varnames  0 : { *(.debug_varnames) }
267  .stack 0x400000 : { _stack = .; *(.stack) }
268  /* These must appear regardless of  .  */
269}
Note: See TracBrowser for help on using the repository browser.