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

4.104.114.84.95
Last change on this file since 85c92574 was 85c92574, checked in by Joel Sherrill <joel.sherrill@…>, on May 9, 2002 at 9:37:30 PM

2001-05-09 Joel Sherrill <joel@…>

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