source: rtems/c/src/lib/libbsp/powerpc/psim/startup/linkcmds @ 08311cc3

4.104.114.84.95
Last change on this file since 08311cc3 was 08311cc3, checked in by Joel Sherrill <joel.sherrill@…>, on Nov 17, 1999 at 5:51:34 PM

Updated copyright notice.

  • Property mode set to 100644
File size: 6.0 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.OARcorp.com/rtems/license.html.
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    /* .gnu.warning sections are handled specially by elf32.em.  */
65    *(.gnu.warning)
66  } >RAM
67  .init           : { *(.init)          } >RAM
68  .fini           : { *(.fini)          } >RAM
69  .rodata         : { *(.rodata) *(.gnu.linkonce.r*) } >RAM
70  .rodata1        : { *(.rodata1)       } >RAM
71  PROVIDE (_etext = .);
72  PROVIDE (etext = .);
73  PROVIDE (__SDATA2_START__ = .);
74  .sdata2         : { *(.sdata2)        } >RAM
75  .sbss2          : { *(.sbss2)         } >RAM
76  PROVIDE (__SBSS2_END__ = .);
77  /* Adjust the address for the data segment.  We want to adjust up to
78     the same address within the page on the next page up.  It would
79     be more correct to do this:
80       . = ALIGN(0x40000) + (ALIGN(8) & (0x40000 - 1));
81     The current expression does not correctly handle the case of a
82     text segment ending precisely at the end of a page; it causes the
83     data segment to skip a page.  The above expression does not have
84     this problem, but it will currently (2/95) cause BFD to allocate
85     a single segment, combining both text and data, for this case.
86     This will prevent the text segment from being shared among
87     multiple executions of the program; I think that is more
88     important than losing a page of the virtual address space (note
89     that no actual memory is lost; the page which is skipped can not
90     be referenced).  */
91  /* . =  ALIGN(8) + 0x40000; */
92  .data    :
93  {
94    *(.data)
95    *(.gnu.linkonce.d.*)
96    CONSTRUCTORS
97  } >RAM
98  PROVIDE (__EXCEPT_START__ = .);
99  .gcc_except_table   : { *(.gcc_except_table) } >RAM
100  PROVIDE (__EXCEPT_END__ = .);
101
102  .data1          : { *(.data1)         } >RAM
103  .got1           : { *(.got1)          } >RAM
104  .dynamic        : { *(.dynamic)       } >RAM
105  /* Put .ctors and .dtors next to the .got2 section, so that the pointers
106     get relocated with -mrelocatable. Also put in the .fixup pointers.
107     The current compiler no longer needs this, but keep it around for 2.7.2  */
108   PROVIDE (__GOT2_START__ = .);
109   PROVIDE (_GOT2_START_ = .);
110  .got2           :  { *(.got2)         } >RAM
111  PROVIDE (__GOT2_END__ = .);
112  PROVIDE (_GOT2_END_ = .);
113
114  PROVIDE (__CTOR_LIST__ = .);
115  .ctors          : { *(.ctors)         } >RAM
116  PROVIDE (__CTOR_END__ = .);
117
118  PROVIDE (__DTOR_LIST__ = .);
119  .dtors          : { *(.dtors)         } >RAM
120  PROVIDE (__DTOR_END__ = .);
121
122  PROVIDE (__FIXUP_START__ = .);
123  PROVIDE (_FIXUP_START_ = .);
124  .fixup          : { *(.fixup)         } >RAM
125  PROVIDE (_FIXUP_END_ = .);
126  PROVIDE (__FIXUP_END__ = .);
127
128  PROVIDE (__GOT_START__ = .);
129  PROVIDE (_GOT_START_ = .);
130  s.got = .;
131  .got            : { *(.got)           } >RAM
132  .got.plt        : { *(.got.plt)       } >RAM
133  PROVIDE (_GOT_END_ = .);
134  PROVIDE (__GOT_END__ = .);
135
136  /* We want the small data sections together, so single-instruction offsets
137     can access them all, and initialized data all before uninitialized, so
138     we can shorten the on-disk segment size.  */
139  PROVIDE (__SDATA_START__ = .);
140  .sdata          : { *(.sdata)         } >RAM
141  _edata  =  .;
142  PROVIDE (edata = .);
143
144  PROVIDE (RAM_END = 0x7f0000);
145  .sbss      :
146  {
147    PROVIDE (__sbss_start = .);
148    *(.sbss)
149    *(.scommon)
150    PROVIDE (__sbss_end = .);
151  } >RAM
152  PROVIDE (__SBSS_END__ = .);
153
154  .bss       :
155  {
156   PROVIDE (__bss_start = .);
157   *(.dynbss)
158   *(.bss)
159   *(COMMON)
160  } >RAM
161  . =  ALIGN(8) + 0x8000;
162  PROVIDE(__stack = .);
163  PROVIDE(_end = .);
164  PROVIDE(end = .);
165
166  /* These are needed for ELF backends which have not yet been
167     converted to the new style linker.  */
168  .stab 0 : { *(.stab) }
169  .stabstr 0 : { *(.stabstr) }
170  /* DWARF debug sections.
171     Symbols in the DWARF debugging sections are relative to the beginning
172     of the section so we begin them at 0.  */
173  /* DWARF 1 */
174  .debug          0 : { *(.debug) }
175  .line           0 : { *(.line) }
176  /* GNU DWARF 1 extensions */
177  .debug_srcinfo  0 : { *(.debug_srcinfo) }
178  .debug_sfnames  0 : { *(.debug_sfnames) }
179  /* DWARF 1.1 and DWARF 2 */
180  .debug_aranges  0 : { *(.debug_aranges) }
181  .debug_pubnames 0 : { *(.debug_pubnames) }
182  /* DWARF 2 */
183  .debug_info     0 : { *(.debug_info) }
184  .debug_abbrev   0 : { *(.debug_abbrev) }
185  .debug_line     0 : { *(.debug_line) }
186  .debug_frame    0 : { *(.debug_frame) }
187  .debug_str      0 : { *(.debug_str) }
188  .debug_loc      0 : { *(.debug_loc) }
189  .debug_macinfo  0 : { *(.debug_macinfo) }
190  /* SGI/MIPS DWARF 2 extensions */
191  .debug_weaknames 0 : { *(.debug_weaknames) }
192  .debug_funcnames 0 : { *(.debug_funcnames) }
193  .debug_typenames 0 : { *(.debug_typenames) }
194  .debug_varnames  0 : { *(.debug_varnames) }
195  /* These must appear regardless of  .  */
196}
Note: See TracBrowser for help on using the repository browser.