source: rtems/c/src/lib/libbsp/powerpc/score603e/startup/linkcmds @ 417fca76

4.104.114.84.95
Last change on this file since 417fca76 was 417fca76, checked in by Joel Sherrill <joel.sherrill@…>, on 08/09/06 at 23:02:38

2006-08-09 Joel Sherrill <joel@…>

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