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

4.104.114.84.95
Last change on this file since b6394ae was b6394ae, checked in by Joel Sherrill <joel.sherrill@…>, on 04/15/98 at 15:13:01

Transitioned to shared bsp_libc_init() and cleaned up comments.

  • Property mode set to 100644
File size: 5.7 KB
Line 
1/*
2 *
3 *  COPYRIGHT (c) 1989-1998.
4 *  On-Line Applications Research Corporation (OAR).
5 *  Copyright assigned to U.S. Government, 1994.
6 *
7 *  The license and distribution terms for this file may be
8 *  found in found in the file LICENSE in this distribution or at
9 *  http://www.OARcorp.com/rtems/license.html.
10 *
11 *  $Id$
12 */
13
14OUTPUT_FORMAT("elf32-powerpc", "elf32-powerpc",
15              "elf32-powerpc")
16OUTPUT_ARCH(powerpc)
17ENTRY(_start)
18 /*SEARCH_DIR(/usr1/gnu/cross/powerpc-unknown-eabi//powerpc-unknown-eabi/lib); */
19/* Do we need any of these for elf?
20   __DYNAMIC = 0;    */
21PROVIDE (__stack = 0);
22PROVIDE (PSIM_INSTRUCTIONS_PER_MICROSECOND = 100);
23MEMORY
24  {
25        RAM : ORIGIN = 0, LENGTH = 4M
26        EPROM : ORIGIN = 0xFFF00000, LENGTH = 0x20000
27  }
28
29SECTIONS
30{
31  .vectors 0xFFF00100 :
32  {
33    *(.vectors)
34  }
35
36  /* Read-only sections, merged into text segment: */
37  /* . = 0x40000 + SIZEOF_HEADERS; */
38  . = 0x4000;
39  .interp   : { *(.interp) }
40  .hash           : { *(.hash)          }
41  .dynsym         : { *(.dynsym)                }
42  .dynstr         : { *(.dynstr)                }
43  .rela.text      : { *(.rela.text)     }
44  .rela.data      : { *(.rela.data)     }
45  .rela.rodata    : { *(.rela.rodata)   }
46  .rela.got       : { *(.rela.got)      }
47  .rela.got1      : { *(.rela.got1)     }
48  .rela.got2      : { *(.rela.got2)     }
49  .rela.ctors     : { *(.rela.ctors)    }
50  .rela.dtors     : { *(.rela.dtors)    }
51  .rela.init      : { *(.rela.init)     }
52  .rela.fini      : { *(.rela.fini)     }
53  .rela.bss       : { *(.rela.bss)      }
54  .rela.plt       : { *(.rela.plt)      }
55  .rela.sdata     : { *(.rela.sdata2)   }
56  .rela.sbss      : { *(.rela.sbss2)    }
57  .rela.sdata2    : { *(.rela.sdata2)   }
58  .rela.sbss2     : { *(.rela.sbss2)    }
59  .plt   : { *(.plt) }
60  .text      :
61  {
62    *(.text)
63    *(.descriptors)
64    /* .gnu.warning sections are handled specially by elf32.em.  */
65    *(.gnu.warning)
66  } =0
67  .init           : { *(.init)          } =0
68  .fini           : { *(.fini)          } =0
69  .rodata         : { *(.rodata)  }
70  .rodata1        : { *(.rodata1) }
71  _etext = .;
72  PROVIDE (etext = .);
73  PROVIDE (__SDATA2_START__ = .);
74  .sdata2   : { *(.sdata2) }
75  .sbss2   : { *(.sbss2) }
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    CONSTRUCTORS
96  }
97  PROVIDE (__EXCEPT_START__ = .);
98  .gcc_except_table   : { *(.gcc_except_table) }
99  PROVIDE (__EXCEPT_END__ = .);
100
101  .data1   : { *(.data1) }
102  .got1           : { *(.got1) }
103  .dynamic        : { *(.dynamic) }
104  /* Put .ctors and .dtors next to the .got2 section, so that the pointers
105     get relocated with -mrelocatable. Also put in the .fixup pointers.
106     The current compiler no longer needs this, but keep it around for 2.7.2  */
107                PROVIDE (_GOT2_START_ = .);
108  .got2           :  { *(.got2) }
109                PROVIDE (__GOT2_END__ = .);
110                PROVIDE (__CTOR_LIST__ = .);
111  .ctors          : { *(.ctors) }
112                PROVIDE (__CTOR_END__ = .);
113                PROVIDE (__DTOR_LIST__ = .);
114  .dtors          : { *(.dtors) }
115                PROVIDE (__DTOR_END__ = .);
116                PROVIDE (_FIXUP_START_ = .);
117  .fixup          : { *(.fixup) }
118                PROVIDE (_FIXUP_END_ = .);
119                PROVIDE (__FIXUP_END__ = .);
120                PROVIDE (_GOT2_END_ = .);
121                PROVIDE (_GOT_START_ = .);
122  s.got = .;
123  .got            : { *(.got) }
124  .got.plt        : { *(.got.plt) }
125                PROVIDE (_GOT_END_ = .);
126                PROVIDE (__GOT_END__ = .);
127  /* We want the small data sections together, so single-instruction offsets
128     can access them all, and initialized data all before uninitialized, so
129     we can shorten the on-disk segment size.  */
130  PROVIDE (__SDATA_START__ = .);
131  .sdata          : { *(.sdata) }
132  _edata  =  .;
133  PROVIDE (edata = .);
134  PROVIDE (RAM_END = 0x3f0000);
135  .sbss      :
136  {
137    PROVIDE (__sbss_start = .);
138    *(.sbss)
139    *(.scommon)
140    PROVIDE (__sbss_end = .);
141  }
142  PROVIDE (__SBSS_END__ = .);
143  .bss       :
144  {
145   PROVIDE (__bss_start = .);
146   *(.dynbss)
147   *(.bss)
148   *(COMMON)
149  }
150  . =  ALIGN(8) + 0x8000;
151  __stack = .;
152  _end = . ;
153  PROVIDE (end = .);
154
155  /* These are needed for ELF backends which have not yet been
156     converted to the new style linker.  */
157  .stab 0 : { *(.stab) }
158  .stabstr 0 : { *(.stabstr) }
159  /* DWARF debug sections.
160     Symbols in the DWARF debugging sections are relative to the beginning
161     of the section so we begin them at 0.  */
162  /* DWARF 1 */
163  .debug          0 : { *(.debug) }
164  .line           0 : { *(.line) }
165  /* GNU DWARF 1 extensions */
166  .debug_srcinfo  0 : { *(.debug_srcinfo) }
167  .debug_sfnames  0 : { *(.debug_sfnames) }
168  /* DWARF 1.1 and DWARF 2 */
169  .debug_aranges  0 : { *(.debug_aranges) }
170  .debug_pubnames 0 : { *(.debug_pubnames) }
171  /* DWARF 2 */
172  .debug_info     0 : { *(.debug_info) }
173  .debug_abbrev   0 : { *(.debug_abbrev) }
174  .debug_line     0 : { *(.debug_line) }
175  .debug_frame    0 : { *(.debug_frame) }
176  .debug_str      0 : { *(.debug_str) }
177  .debug_loc      0 : { *(.debug_loc) }
178  .debug_macinfo  0 : { *(.debug_macinfo) }
179  /* SGI/MIPS DWARF 2 extensions */
180  .debug_weaknames 0 : { *(.debug_weaknames) }
181  .debug_funcnames 0 : { *(.debug_funcnames) }
182  .debug_typenames 0 : { *(.debug_typenames) }
183  .debug_varnames  0 : { *(.debug_varnames) }
184  /* These must appear regardless of  .  */
185}
Note: See TracBrowser for help on using the repository browser.