source: rtems/c/src/lib/libbsp/sh/simsh4/startup/linkcmds-le @ 628d804

4.104.115
Last change on this file since 628d804 was 628d804, checked in by Joel Sherrill <joel.sherrill@…>, on 09/15/08 at 19:18:36

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

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