source: rtems/c/src/lib/libbsp/powerpc/score603e/startup/linkcmds @ 960fd85

4.115
Last change on this file since 960fd85 was 960fd85, checked in by Sebastian Huber <sebastian.huber@…>, on 01/28/14 at 10:52:17

bsps: Thread-local storage (TLS) for linkcmds

  • Property mode set to 100644
File size: 7.6 KB
Line 
1OUTPUT_FORMAT("elf32-powerpc", "elf32-powerpc",
2              "elf32-powerpc")
3
4OUTPUT_ARCH(powerpc)
5ENTRY(_start)
6
7/*
8 *  Number of Decrementer countdowns per millisecond
9 *
10 *  Calculated by:  (66 Mhz * 1000) / 4 cycles per click
11 */
12
13PROVIDE(CPU_PPC_CLICKS_PER_MS = 16500);
14
15RamBase = DEFINED(RamBase) ? RamBase : 0x0;
16RamSize = DEFINED(RamSize) ? RamSize : 31M;
17
18MEMORY
19  {
20        VECTORS : ORIGIN = 0, LENGTH = 64K
21        RAM : ORIGIN = 1M, LENGTH = 31M
22        EPROM : ORIGIN = 0xFFF00000, LENGTH = 0x80000
23  }
24
25SECTIONS
26{
27  .vectors 0x00100 :
28  {
29    *(.vectors)
30  }
31
32  /* Read-only sections, merged into text segment: */
33  /* SDS ROM worked at 0x30000                     */
34  .interp         : { *(.interp) }
35  .hash           : { *(.hash)          }
36  .dynsym         : { *(.dynsym)                }
37  .dynstr         : { *(.dynstr)                }
38
39  .rel.dyn        :
40    {
41      *(.rel.init)
42      *(.rel.text .rel.text.* .rel.gnu.linkonce.t.*)
43      *(.rel.fini)
44      *(.rel.rodata .rel.rodata.* .rel.gnu.linkonce.r.*)
45      *(.rel.data.rel.ro* .rel.gnu.linkonce.d.rel.ro.*)
46      *(.rel.data .rel.data.* .rel.gnu.linkonce.d.*)
47      *(.rel.tdata .rel.tdata.* .rel.gnu.linkonce.td.*)
48      *(.rel.tbss .rel.tbss.* .rel.gnu.linkonce.tb.*)
49      *(.rel.ctors)
50      *(.rel.dtors)
51      *(.rel.got)
52      *(.rel.sdata .rel.sdata.* .rel.gnu.linkonce.s.*)
53      *(.rel.sbss .rel.sbss.* .rel.gnu.linkonce.sb.*)
54      *(.rel.sdata2 .rel.sdata2.* .rel.gnu.linkonce.s2.*)
55      *(.rel.sbss2 .rel.sbss2.* .rel.gnu.linkonce.sb2.*)
56      *(.rel.bss .rel.bss.* .rel.gnu.linkonce.b.*)
57    } >RAM
58  .rela.dyn       :
59    {
60      *(.rela.init)
61      *(.rela.text .rela.text.* .rela.gnu.linkonce.t.*)
62      *(.rela.fini)
63      *(.rela.rodata .rela.rodata.* .rela.gnu.linkonce.r.*)
64      *(.rela.data .rela.data.* .rela.gnu.linkonce.d.*)
65      *(.rela.tdata .rela.tdata.* .rela.gnu.linkonce.td.*)
66      *(.rela.tbss .rela.tbss.* .rela.gnu.linkonce.tb.*)
67      *(.rela.ctors)
68      *(.rela.dtors)
69      *(.rela.got)
70      *(.rela.got1)
71      *(.rela.got2)
72      *(.rela.sdata .rela.sdata.* .rela.gnu.linkonce.s.*)
73      *(.rela.sbss .rela.sbss.* .rela.gnu.linkonce.sb.*)
74      *(.rela.sdata2 .rela.sdata2.* .rela.gnu.linkonce.s2.*)
75      *(.rela.sbss2 .rela.sbss2.* .rela.gnu.linkonce.sb2.*)
76      *(.rela.bss .rela.bss.* .rela.gnu.linkonce.b.*)
77    } >RAM
78  .rel.plt        : { *(.rel.plt) }
79  .rela.plt       : { *(.rela.plt) }
80
81  .plt   : { *(.plt) }
82 .text  0x100000:
83  {
84   
85    *(.text*)
86    *(.gnu.linkonce.t.*)
87    *(.descriptors)
88
89    /*
90     * Special FreeBSD sysctl sections.
91     */
92    . = ALIGN (16);
93    __start_set_sysctl_set = .;
94    *(set_sysctl_*);
95    __stop_set_sysctl_set = ABSOLUTE(.);
96    *(set_domain_*);
97    *(set_pseudo_*);
98
99    /* .gnu.warning sections are handled specially by elf32.em.  */
100    *(.gnu.warning)
101  }  >RAM
102  .init           : { _init = .; __init = .; *(.init)           } >RAM
103  .fini           : { _fini = .; __fini = .; *(.fini)           } >RAM
104  .rodata         : { *(.rodata*) *(.gnu.linkonce.r*) } >RAM
105  .rodata1        : { *(.rodata1)               } >RAM
106  .tdata : {
107    _TLS_Data_begin = .;
108    *(.tdata .tdata.* .gnu.linkonce.td.*)
109    _TLS_Data_end = .;
110  } >RAM
111  .tbss : {
112    _TLS_BSS_begin = .;
113    *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon)
114    _TLS_BSS_end = .;
115  } >RAM
116  _TLS_Data_size = _TLS_Data_end - _TLS_Data_begin;
117  _TLS_BSS_size = _TLS_BSS_end - _TLS_BSS_begin;
118  _TLS_Size = _TLS_BSS_end - _TLS_Data_begin;
119  _TLS_Alignment = ALIGNOF (.tdata);
120  .eh_frame       : { *(.eh_frame)              } >RAM
121  _etext = .;
122  PROVIDE (_etext = .);
123  PROVIDE (__SDATA2_START__ = .);
124  .sdata2         : { *(.sdata2) *(.gnu.linkonce.s2.*)  } >RAM
125  .sbss2          : { *(.sbss2) *(.gnu.linkonce.sb2.*)  } >RAM
126  PROVIDE (__SBSS2_END__ = .);
127  /* Adjust the address for the data segment.  We want to adjust up to
128     the same address within the page on the next page up.  It would
129     be more correct to do this:
130       . = ALIGN(0x40000) + (ALIGN(8) & (0x40000 - 1));
131     The current expression does not correctly handle the case of a
132     text segment ending precisely at the end of a page; it causes the
133     data segment to skip a page.  The above expression does not have
134     this problem, but it will currently (2/95) cause BFD to allocate
135     a single segment, combining both text and data, for this case.
136     This will prevent the text segment from being shared among
137     multiple executions of the program; I think that is more
138     important than losing a page of the virtual address space (note
139     that no actual memory is lost; the page which is skipped can not
140     be referenced).  */
141  . =  ALIGN(8) + 0x40000;
142  PROVIDE (sdata = .);
143  .data    :
144  {
145   *(.data)
146    *(.data.*)
147    *(.gnu.linkonce.d.*)
148    CONSTRUCTORS
149  } >RAM
150  PROVIDE (__EXCEPT_START__ = .);
151  .gcc_except_table   : { *(.gcc_except_table*) } >RAM
152  PROVIDE (__EXCEPT_END__ = .);
153
154  .data1          : { *(.data1)         } >RAM
155  .got1           : { *(.got1)          } >RAM
156  .dynamic        : { *(.dynamic)       } >RAM
157  /* Put .ctors and .dtors next to the .got2 section, so that the pointers
158     get relocated with -mrelocatable. Also put in the .fixup pointers.
159     The current compiler no longer needs this, but keep it around for 2.7.2  */
160                PROVIDE (_GOT2_START_ = .);
161  .got2           :  { *(.got2) } >RAM
162                PROVIDE (__GOT2_END__ = .);
163                PROVIDE (__CTOR_LIST__ = .);
164  .ctors          : { *(.ctors) } >RAM
165                PROVIDE (__CTOR_END__ = .);
166                PROVIDE (__DTOR_LIST__ = .);
167  .dtors          : { *(.dtors) } >RAM
168                PROVIDE (__DTOR_END__ = .);
169                PROVIDE (_FIXUP_START_ = .);
170  .fixup          : { *(.fixup) } >RAM
171                PROVIDE (_FIXUP_END_ = .);
172                PROVIDE (__FIXUP_END__ = .);
173                PROVIDE (_GOT2_END_ = .);
174  .got            : {
175    PROVIDE (_GOT_START_ = .);
176    s.got = .;
177    *(.got)
178  }      >RAM
179  .got.plt        : { *(.got.plt) } >RAM
180                PROVIDE (_GOT_END_ = .);
181                PROVIDE (__GOT_END__ = .);
182  /* We want the small data sections together, so single-instruction offsets
183     can access them all, and initialized data all before uninitialized, so
184     we can shorten the on-disk segment size.  */
185  PROVIDE (__SDATA_START__ = .);
186  .sdata          : {
187     *(.sdata*)
188     *(.gnu.linkonce.s.*)
189     _edata  =  .;
190  } >RAM
191  PROVIDE (_edata = .);
192  PROVIDE (RAM_END = ADDR(.text) + 10M);
193  . =  ALIGN(8) + 0x1000;
194  .sbss      :
195  {
196    PROVIDE (__sbss_start = .);
197    *(.sbss*)
198    *(.scommon)
199    *(.gnu.linkonce.sb.*)
200    PROVIDE (__sbss_end = .);
201  } >RAM
202  .bss       :
203  {
204    PROVIDE (__bss_start = .);
205    *(.dynbss)
206    *(.bss .bss* .gnu.linkonce.b*)
207    *(COMMON)
208  }  >RAM
209  . = ALIGN(16) + 0x8000;
210  PROVIDE (__stack = .);
211  __rtems_end = . ;
212  . =  ALIGN(8) + 0x8000;
213  PROVIDE(_end = .);
214  PROVIDE(end = .);
215
216  /* These are needed for ELF backends which have not yet been
217     converted to the new style linker.  */
218  .stab 0 : { *(.stab) } >RAM
219  .stabstr 0 : { *(.stabstr) }
220  /* DWARF debug sections.
221     Symbols in the DWARF debugging sections are relative to the beginning
222     of the section so we begin them at 0.  */
223  /* DWARF 1 */
224  .debug          0 : { *(.debug) }
225  .line           0 : { *(.line) }
226  /* GNU DWARF 1 extensions */
227  .debug_srcinfo  0 : { *(.debug_srcinfo) }
228  .debug_sfnames  0 : { *(.debug_sfnames) }
229  /* DWARF 1.1 and DWARF 2 */
230  .debug_aranges  0 : { *(.debug_aranges) }
231  .debug_pubnames 0 : { *(.debug_pubnames) }
232  /* DWARF 2 */
233  .debug_info     0 : { *(.debug_info) }
234  .debug_abbrev   0 : { *(.debug_abbrev) }
235  .debug_line     0 : { *(.debug_line) }
236  .debug_frame    0 : { *(.debug_frame) }
237  .debug_str      0 : { *(.debug_str) }
238  .debug_loc      0 : { *(.debug_loc) }
239  .debug_macinfo  0 : { *(.debug_macinfo) }
240  /* SGI/MIPS DWARF 2 extensions */
241  .debug_weaknames 0 : { *(.debug_weaknames) }
242  .debug_funcnames 0 : { *(.debug_funcnames) }
243  .debug_typenames 0 : { *(.debug_typenames) }
244  .debug_varnames  0 : { *(.debug_varnames) }
245  /* These must appear regardless of  .  */
246}
Note: See TracBrowser for help on using the repository browser.