source: rtems/c/src/lib/libbsp/powerpc/psim/startup/linkcmds @ 9d2bdb5

4.104.114.84.95
Last change on this file since 9d2bdb5 was 9d2bdb5, checked in by Joel Sherrill <joel.sherrill@…>, on 09/04/03 at 18:52:31

2003-09-04 Joel Sherrill <joel@…>

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