source: rtems/c/src/lib/libbsp/sh/simsh4/startup/linkcmds-le @ 190003b

4.104.115
Last change on this file since 190003b was 190003b, checked in by Joel Sherrill <joel.sherrill@…>, on 09/16/08 at 20:13:27

2008-09-16 Joel Sherrill <joel.sherrill@…>

  • Makefile.am, startup/linkcmds, startup/linkcmds-le, startup/linkcmds-le.coff: Use top level shared bsp_get_work_area() implementation.
  • Property mode set to 100644
File size: 6.8 KB
Line 
1/*
2FIXME: Why is a special linkcmds required for little endian?
3  OUTPUT_FORMAT("elf32-shl", "elf32-shl",
4              "elf32-shl")
5 */
6OUTPUT_ARCH(sh)
7ENTRY(_start)
8/* Do we need any of these for elf?
9   __DYNAMIC = 0;    */
10
11_RamBase = DEFINED(_RamBase) ? _RamBase : 0x00000000;
12_RamSize = DEFINED(_RamSize) ? _RamSize : 0x01000000;
13_HeapSize = DEFINED(_HeapSize) ? _HeapSize : 0x0;
14
15MEMORY
16{
17  ram           : o = 0x00000000, l = 0x01000000
18}
19
20SECTIONS
21{
22  /* Read-only sections, merged into text segment: */
23  /*  . = 0x1000; */
24  . = 0x00004000 ;
25  .interp     : { *(.interp)    }
26  .hash          : { *(.hash)           }
27  .dynsym        : { *(.dynsym)         }
28  .dynstr        : { *(.dynstr)         }
29  .gnu.version   : { *(.gnu.version)    }
30  .gnu.version_d   : { *(.gnu.version_d)        }
31  .gnu.version_r   : { *(.gnu.version_r)        }
32  .rel.init      : { *(.rel.init)       }
33  .rela.dyn       :
34    {
35      *(.rela.init)
36      *(.rela.text .rela.text.* .rela.gnu.linkonce.t.*)
37      *(.rela.fini)
38      *(.rela.rodata .rela.rodata.* .rela.gnu.linkonce.r.*)
39      *(.rela.data .rela.data.* .rela.gnu.linkonce.d.*)
40      *(.rela.tdata .rela.tdata.* .rela.gnu.linkonce.td.*)
41      *(.rela.tbss .rela.tbss.* .rela.gnu.linkonce.tb.*)
42      *(.rela.ctors)
43      *(.rela.dtors)
44      *(.rela.got)
45      *(.rela.sdata .rela.sdata.* .rela.gnu.linkonce.s.*)
46      *(.rela.sbss .rela.sbss.* .rela.gnu.linkonce.sb.*)
47      *(.rela.sdata2 .rela.sdata2.* .rela.gnu.linkonce.s2.*)
48      *(.rela.sbss2 .rela.sbss2.* .rela.gnu.linkonce.sb2.*)
49      *(.rela.bss .rela.bss.* .rela.gnu.linkonce.b.*)
50    } >ram
51  .rel.text      :
52    {
53      *(.rel.text)
54      *(.rel.text.*)
55      *(.rel.gnu.linkonce.t*)
56    }
57  .rel.fini      : { *(.rel.fini)       }
58  .rel.rodata    :
59    {
60      *(.rel.rodata)
61      *(.rel.rodata.*)
62      *(.rel.gnu.linkonce.r*)
63    } 
64  .rel.data      :
65    {
66      *(.rel.data)
67      *(.rel.data.*)
68      *(.rel.gnu.linkonce.d*)
69    }
70  .rel.ctors     : { *(.rel.ctors)      }
71  .rel.dtors     : { *(.rel.dtors)      }
72  .rel.got       : { *(.rel.got)                }
73  .rel.sdata     :
74    {
75      *(.rel.sdata)
76      *(.rel.sdata.*)
77      *(.rel.gnu.linkonce.s*)
78    }
79  .rel.sbss      : { *(.rel.sbss)               }
80  .rel.bss       : { *(.rel.bss)                }
81  .rel.plt       : { *(.rel.plt)                }
82  .init          :
83  {
84    KEEP (*(.init))
85  } =0
86  .plt      : { *(.plt) }
87  .text      :
88  {
89    . = . + 16;
90    _start = .;
91    *(.text*)
92    *(.stub)
93
94    /*
95     * Special FreeBSD sysctl sections.
96     */
97    . = ALIGN (16);
98    ___start_set_sysctl_set = .;
99    *(set_sysc*);   /* set_sysctl_* but name is truncated by SH-coff */
100    ___stop_set_sysctl_set = ABSOLUTE(.);
101    *(set_doma*);   /* set_domain_* but name is truncated by SH-coff */
102    *(set_pseudo_*);
103
104    /* .gnu.warning sections are handled specially by elf32.em.  */
105    *(.gnu.warning)
106    *(.gnu.linkonce.t*)
107  } > ram
108  _etext = .;
109  PROVIDE (etext = .);
110  .fini      :
111  {
112    KEEP (*(.fini))
113  } > ram
114  .rodata   : { *(.rodata) *(.rodata.*) *(.gnu.linkonce.r*) } > ram
115  .rodata1   : { *(.rodata1) } > ram
116  /* Adjust the address for the data segment.  We want to adjust up to
117     the same address within the page on the next page up.  */
118  . = ALIGN(128) + (. & (128 - 1));
119  .data    :
120  {
121    *(.data)
122    *(.data.*)
123    *(.gcc_exc)
124    ___EH_FRAME_BEGIN__ = .;
125    *(.eh_fram*)
126    ___EH_FRAME_END__ = .;
127    LONG(0);
128    *(.gcc_except_table*)
129    *(.gnu.linkonce.d*)
130    SORT(CONSTRUCTORS)
131  } > ram
132  .data1   : { *(.data1) } > ram
133  .ctors   :
134  {
135    ___ctors = .;
136    /* gcc uses crtbegin.o to find the start of
137       the constructors, so we make sure it is
138       first.  Because this is a wildcard, it
139       doesn't matter if the user does not
140       actually link against crtbegin.o; the
141       linker won't look for a file to match a
142       wildcard.  The wildcard also means that it
143       doesn't matter which directory crtbegin.o
144       is in.  */
145    KEEP (*crtbegin.o(.ctors))
146    /* We don't want to include the .ctor section from
147       from the crtend.o file until after the sorted ctors.
148       The .ctor section from the crtend file contains the
149       end of ctors marker and it must be last */
150    KEEP (*(EXCLUDE_FILE (*crtend.o ) .ctors))
151    KEEP (*(SORT(.ctors.*)))
152    KEEP (*(.ctors))
153    ___ctors_end = .;
154  } > ram
155   .dtors         :
156  {
157    ___dtors = .;
158    KEEP (*crtbegin.o(.dtors))
159    KEEP (*(EXCLUDE_FILE (*crtend.o ) .dtors))
160    KEEP (*(SORT(.dtors.*)))
161    KEEP (*(.dtors))
162    ___dtors_end = .;
163  } > ram
164  .got           : { *(.got.plt) *(.got) }
165  .dynamic       : { *(.dynamic) }
166  /* We want the small data sections together, so single-instruction offsets
167     can access them all, and initialized data all before uninitialized, so
168     we can shorten the on-disk segment size.  */
169  .sdata     :
170  {
171    *(.sdata)
172    *(.sdata.*)
173    *(.gnu.linkonce.s.*)
174  } > ram
175  _edata = .;
176  PROVIDE (edata = .);
177  __bss_start = .;
178  .sbss      :
179  {
180    *(.dynsbss)
181    *(.sbss*)
182    *(.scommon)
183  } > ram
184  .bss       :
185  {
186   *(.dynbss)
187   *(.bss .bss* .gnu.linkonce.b*)
188   *(COMMON)
189   /* Align here to ensure that the .bss section occupies space up to
190      _end.  Align after .bss to ensure correct alignment even if the
191      .bss section disappears because there are no input sections.  */
192   . = ALIGN(32 / 8);
193  } > ram
194  . = ALIGN(32 / 8);
195  _end = .;
196  PROVIDE (end = .);
197
198  . = ALIGN(16);
199  .stack . : {
200     . = . + 4096;
201  }
202
203  . = ALIGN(16);
204  _WorkAreaBase = . ;
205
206  . = ALIGN(16);
207  _CPU_Interrupt_stack_low  = . ;
208  _CPU_Interrupt_stack_high = _CPU_Interrupt_stack_low + 4096 ;
209
210  /* Stabs debugging sections.  */
211  .stab 0 : { *(.stab) }
212  .stabstr 0 : { *(.stabstr) }
213  .stab.excl 0 : { *(.stab.excl) }
214  .stab.exclstr 0 : { *(.stab.exclstr) }
215  .stab.index 0 : { *(.stab.index) }
216  .stab.indexstr 0 : { *(.stab.indexstr) }
217  .comment 0 : { *(.comment) }
218  /* DWARF debug sections.
219     Symbols in the DWARF debugging sections are relative to the beginning
220     of the section so we begin them at 0.  */
221  /* DWARF 1 */
222  .debug          0 : { *(.debug) }
223  .line           0 : { *(.line) }
224  /* GNU DWARF 1 extensions */
225  .debug_srcinfo  0 : { *(.debug_srcinfo) }
226  .debug_sfnames  0 : { *(.debug_sfnames) }
227  /* DWARF 1.1 and DWARF 2 */
228  .debug_aranges  0 : { *(.debug_aranges) }
229  .debug_pubnames 0 : { *(.debug_pubnames) }
230  /* DWARF 2 */
231  .debug_info     0 : { *(.debug_info) }
232  .debug_abbrev   0 : { *(.debug_abbrev) }
233  .debug_line     0 : { *(.debug_line) }
234  .debug_frame    0 : { *(.debug_frame) }
235  .debug_str      0 : { *(.debug_str) }
236  .debug_loc      0 : { *(.debug_loc) }
237  .debug_macinfo  0 : { *(.debug_macinfo) }
238  /* SGI/MIPS DWARF 2 extensions */
239  .debug_weaknames 0 : { *(.debug_weaknames) }
240  .debug_funcnames 0 : { *(.debug_funcnames) }
241  .debug_typenames 0 : { *(.debug_typenames) }
242  .debug_varnames  0 : { *(.debug_varnames) }
243  .stack 0x30000 : { _stack = .; *(.stack) }
244  /* These must appear regardless of  .  */
245}
Note: See TracBrowser for help on using the repository browser.