source: rtems/c/src/lib/libbsp/powerpc/psim/startup/linkcmds @ 561f53b

Last change on this file since 561f53b was 561f53b, checked in by Jennifer Averett <Jennifer.Averett@…>, on Nov 22, 2004 at 10:30:59 PM

2004-11-22 Jennifer Averett <jennifer@…>

PR 581/bsps

  • Makefile.am, bsp_specs, configure.ac, clock/Makefile.am, include/bsp.h, start/Makefile.am, start/start.S, startup/Makefile.am, startup/bspstart.c, startup/linkcmds, vectors/Makefile.am, vectors/vectors.S, wrapup/Makefile.am: Convert PSIM to new exception model.
  • irq/Makefile.am, irq/irq.c, irq/irq.h, irq/irq_asm.S, irq/irq_init.c: New files.
  • clock/clock.c: Removed.
  • Property mode set to 100644
File size: 6.4 KB
Line 
1/*
2 *
3 *  COPYRIGHT (c) 1989-1999.
4 *  On-Line Applications Research Corporation (OAR).
5 *
6 *  The license and distribution terms for this file may be
7 *  found in found in the file LICENSE in this distribution or at
8 *  http://www.rtems.com/license/LICENSE.
9 *
10 *  $Id$
11 */
12
13OUTPUT_FORMAT("elf32-powerpc", "elf32-powerpc",
14              "elf32-powerpc")
15OUTPUT_ARCH(powerpc)
16ENTRY(_start)
17/* Do we need any of these for elf?
18   __DYNAMIC = 0;    */
19PROVIDE (PSIM_INSTRUCTIONS_PER_MICROSECOND = 10000);   /* 100); */
20PROVIDE (CPU_PPC_CLICKS_PER_MS = 16667);
21MEMORY
22  {
23        RAM : ORIGIN = 0, LENGTH = 8M
24        EPROM : ORIGIN = 0xFFF00000, LENGTH = 0x20000
25  }
26
27SECTIONS
28{
29  .entry_point_section :
30  {
31        *(.entry_point_section)
32  } > EPROM
33
34  /* Read-only sections, merged into text segment: */
35  /* . = 0x40000 + SIZEOF_HEADERS; */
36  . = 0x4000;
37  .interp         : { *(.interp) }
38  .hash           : { *(.hash)          }
39  .dynsym         : { *(.dynsym)                }
40  .dynstr         : { *(.dynstr)                }
41  .rela.text      : { *(.rela.text)     }
42  .rela.data      : { *(.rela.data)     }
43  .rela.rodata    : { *(.rela.rodata)   }
44  .rela.got       : { *(.rela.got)      }
45  .rela.got1      : { *(.rela.got1)     }
46  .rela.got2      : { *(.rela.got2)     }
47  .rela.ctors     : { *(.rela.ctors)    }
48  .rela.dtors     : { *(.rela.dtors)    }
49  .rela.init      : { *(.rela.init)     }
50  .rela.fini      : { *(.rela.fini)     }
51  .rela.bss       : { *(.rela.bss)      }
52  .rela.plt       : { *(.rela.plt)      }
53  .rela.sdata     : { *(.rela.sdata2)   }
54  .rela.sbss      : { *(.rela.sbss2)    }
55  .rela.sdata2    : { *(.rela.sdata2)   }
56  .rela.sbss2     : { *(.rela.sbss2)    }
57  .plt            : { *(.plt)           }
58  .text      :
59  {
60    *(.text)
61    *(.gnu.linkonce.t.*)
62    *(.descriptors)
63
64    /*
65     * Special FreeBSD sysctl sections.
66     */
67    . = ALIGN (16);
68    __start_set_sysctl_set = .;
69    *(set_sysctl_*);
70    __stop_set_sysctl_set = ABSOLUTE(.);
71    *(set_domain_*);
72    *(set_pseudo_*);
73
74    /* .gnu.warning sections are handled specially by elf32.em.  */
75    *(.gnu.warning)
76  } >RAM
77  .init           :
78  {
79    KEEP (*(.init))
80  } >RAM =0
81  .fini           :
82  {
83    _fini = .;
84    KEEP (*(.fini))
85  } >RAM =0
86  .rodata         : { *(.rodata*) *(.gnu.linkonce.r*) } >RAM
87  .rodata1        : { *(.rodata1)       } >RAM
88  .eh_frame       : { *.(eh_frame)              } >RAM
89  PROVIDE (_etext = .);
90  PROVIDE (etext = .);
91  PROVIDE (__SDATA2_START__ = .);
92  .sdata2         : { *(.sdata2) *(.gnu.linkonce.s2.*)  } >RAM
93  .sbss2          : { *(.sbss2) *(.gnu.linkonce.sb2.*)  } >RAM
94  PROVIDE (__SBSS2_END__ = .);
95  /* Adjust the address for the data segment.  We want to adjust up to
96     the same address within the page on the next page up.  It would
97     be more correct to do this:
98       . = ALIGN(0x40000) + (ALIGN(8) & (0x40000 - 1));
99     The current expression does not correctly handle the case of a
100     text segment ending precisely at the end of a page; it causes the
101     data segment to skip a page.  The above expression does not have
102     this problem, but it will currently (2/95) cause BFD to allocate
103     a single segment, combining both text and data, for this case.
104     This will prevent the text segment from being shared among
105     multiple executions of the program; I think that is more
106     important than losing a page of the virtual address space (note
107     that no actual memory is lost; the page which is skipped can not
108     be referenced).  */
109  /* . =  ALIGN(8) + 0x40000; */
110  .data    :
111  {
112    *(.data .data.* .gnu.linkonce.d.*)
113    SORT(CONSTRUCTORS)
114  } >RAM
115  PROVIDE (__EXCEPT_START__ = .);
116  .gcc_except_table   : { *(.gcc_except_table) } >RAM
117  PROVIDE (__EXCEPT_END__ = .);
118
119  .data1          : { *(.data1)         } >RAM
120  .got1           : { *(.got1)          } >RAM
121  .dynamic        : { *(.dynamic)       } >RAM
122  /* Put .ctors and .dtors next to the .got2 section, so that the pointers
123     get relocated with -mrelocatable. Also put in the .fixup pointers.
124     The current compiler no longer needs this, but keep it around for 2.7.2  */
125   PROVIDE (__GOT2_START__ = .);
126   PROVIDE (_GOT2_START_ = .);
127  .got2           :  { *(.got2)         } >RAM
128  PROVIDE (__GOT2_END__ = .);
129  PROVIDE (_GOT2_END_ = .);
130
131  PROVIDE (__CTOR_LIST__ = .);
132  .ctors          : { *(.ctors)         } >RAM
133  PROVIDE (__CTOR_END__ = .);
134
135  PROVIDE (__DTOR_LIST__ = .);
136  .dtors          : { *(.dtors)         } >RAM
137  PROVIDE (__DTOR_END__ = .);
138
139  PROVIDE (__FIXUP_START__ = .);
140  PROVIDE (_FIXUP_START_ = .);
141  .fixup          : { *(.fixup)         } >RAM
142  PROVIDE (_FIXUP_END_ = .);
143  PROVIDE (__FIXUP_END__ = .);
144
145  PROVIDE (__GOT_START__ = .);
146  PROVIDE (_GOT_START_ = .);
147  s.got = .;
148  .got            : { *(.got)           } >RAM
149  .got.plt        : { *(.got.plt)       } >RAM
150  PROVIDE (_GOT_END_ = .);
151  PROVIDE (__GOT_END__ = .);
152
153  .jcr            : { KEEP (*(.jcr)) } > RAM
154
155  /* We want the small data sections together, so single-instruction offsets
156     can access them all, and initialized data all before uninitialized, so
157     we can shorten the on-disk segment size.  */
158  PROVIDE (__SDATA_START__ = .);
159  .sdata          : { *(.sdata) *(.gnu.linkonce.s.*)    } >RAM
160  _edata  =  .;
161  PROVIDE (edata = .);
162
163  PROVIDE (RAM_END = 0x7f0000);
164  .sbss      :
165  {
166    PROVIDE (__sbss_start = .);
167    *(.sbss)
168    *(.scommon)
169    *(.gnu.linkonce.sb.*)
170    PROVIDE (__sbss_end = .);
171  } >RAM
172  PROVIDE (__SBSS_END__ = .);
173
174  .bss       :
175  {
176   PROVIDE (__bss_start = .);
177   *(.dynbss)
178   *(.bss)
179   *(COMMON)
180  } >RAM
181  . =  ALIGN(8) + 0x8000;
182  __rtems_end = . ;
183  PROVIDE(__stack = .);
184  PROVIDE(_end = .);
185  PROVIDE(end = .);
186
187  /* These are needed for ELF backends which have not yet been
188     converted to the new style linker.  */
189  .stab 0 : { *(.stab) }
190  .stabstr 0 : { *(.stabstr) }
191  /* DWARF debug sections.
192     Symbols in the DWARF debugging sections are relative to the beginning
193     of the section so we begin them at 0.  */
194  /* DWARF 1 */
195  .debug          0 : { *(.debug) }
196  .line           0 : { *(.line) }
197  /* GNU DWARF 1 extensions */
198  .debug_srcinfo  0 : { *(.debug_srcinfo) }
199  .debug_sfnames  0 : { *(.debug_sfnames) }
200  /* DWARF 1.1 and DWARF 2 */
201  .debug_aranges  0 : { *(.debug_aranges) }
202  .debug_pubnames 0 : { *(.debug_pubnames) }
203  /* DWARF 2 */
204  .debug_info     0 : { *(.debug_info) }
205  .debug_abbrev   0 : { *(.debug_abbrev) }
206  .debug_line     0 : { *(.debug_line) }
207  .debug_frame    0 : { *(.debug_frame) }
208  .debug_str      0 : { *(.debug_str) }
209  .debug_loc      0 : { *(.debug_loc) }
210  .debug_macinfo  0 : { *(.debug_macinfo) }
211  /* SGI/MIPS DWARF 2 extensions */
212  .debug_weaknames 0 : { *(.debug_weaknames) }
213  .debug_funcnames 0 : { *(.debug_funcnames) }
214  .debug_typenames 0 : { *(.debug_typenames) }
215  .debug_varnames  0 : { *(.debug_varnames) }
216  /* These must appear regardless of  .  */
217}
Note: See TracBrowser for help on using the repository browser.