source: rtems/c/src/lib/libbsp/powerpc/score603e/startup/linkcmds @ d2b8d742

4.104.114.84.95
Last change on this file since d2b8d742 was add0545d, checked in by Joel Sherrill <joel.sherrill@…>, on 10/06/99 at 18:05:39

Added sections as required by C++ and ELF.

  • Property mode set to 100644
File size: 5.7 KB
Line 
1OUTPUT_FORMAT("elf32-powerpc", "elf32-powerpc",
2              "elf32-powerpc")
3
4OUTPUT_ARCH(powerpc)
5ENTRY(_start)
6
7/*
8 *  Number of Decrementer countdowns per millisecond
9 *
10 *  Calculated by:  (66 Mhz * 1000) / 4 cycles per click
11 */
12
13PROVIDE(CPU_PPC_CLICKS_PER_MS = 16500);
14
15MEMORY
16  {
17        VECTORS : ORIGIN = 0, LENGTH = 64K
18        RAM : ORIGIN = 1M, LENGTH = 15M
19        EPROM : ORIGIN = 0xFFF00000, LENGTH = 0x80000
20  }
21
22SECTIONS
23{
24  .vectors 0x00100 :
25  {
26    *(.vectors)
27  }
28
29  /* Read-only sections, merged into text segment: */
30  /* SDS ROM worked at 0x30000                     */
31  . = 0x100000;
32  .interp         : { *(.interp) }
33  .hash           : { *(.hash)          }
34  .dynsym         : { *(.dynsym)                }
35  .dynstr         : { *(.dynstr)                }
36  .rela.text      : { *(.rela.text)     }
37  .rela.data      : { *(.rela.data)     }
38  .rela.rodata    : { *(.rela.rodata)   }
39  .rela.got       : { *(.rela.got)      }
40  .rela.got1      : { *(.rela.got1)     }
41  .rela.got2      : { *(.rela.got2)     }
42  .rela.ctors     : { *(.rela.ctors)    }
43  .rela.dtors     : { *(.rela.dtors)    }
44  .rela.init      : { *(.rela.init)     }
45  .rela.fini      : { *(.rela.fini)     }
46  .rela.bss       : { *(.rela.bss)      }
47  .rela.plt       : { *(.rela.plt)      }
48  .rela.sdata     : { *(.rela.sdata2)   }
49  .rela.sbss      : { *(.rela.sbss2)    }
50  .rela.sdata2    : { *(.rela.sdata2)   }
51  .rela.sbss2     : { *(.rela.sbss2)    }
52  .plt   : { *(.plt) }
53  .text      :
54  {
55    *(.text)
56    *(.gnu.linkonce.t.*)
57    *(.descriptors)
58    /* .gnu.warning sections are handled specially by elf32.em.  */
59    *(.gnu.warning)
60  } >RAM
61  .init           : { *(.init)          } >RAM
62  .fini           : { *(.fini)          } >RAM
63  .rodata         : { *(.rodata) *(.gnu.linkonce.r*) } >RAM
64  .rodata1        : { *(.rodata1)       } >RAM
65  _etext = .;
66  PROVIDE (etext = .);
67  PROVIDE (__SDATA2_START__ = .);
68  .sdata2         : { *(.sdata2)        } >RAM
69  .sbss2          : { *(.sbss2)         } >RAM
70  PROVIDE (__SBSS2_END__ = .);
71  /* Adjust the address for the data segment.  We want to adjust up to
72     the same address within the page on the next page up.  It would
73     be more correct to do this:
74       . = ALIGN(0x40000) + (ALIGN(8) & (0x40000 - 1));
75     The current expression does not correctly handle the case of a
76     text segment ending precisely at the end of a page; it causes the
77     data segment to skip a page.  The above expression does not have
78     this problem, but it will currently (2/95) cause BFD to allocate
79     a single segment, combining both text and data, for this case.
80     This will prevent the text segment from being shared among
81     multiple executions of the program; I think that is more
82     important than losing a page of the virtual address space (note
83     that no actual memory is lost; the page which is skipped can not
84     be referenced).  */
85  . =  ALIGN(8) + 0x40000;
86  PROVIDE (sdata = .);
87  .data    :
88  {
89    *(.data)
90    *(.gnu.linkonce.d.*)
91    CONSTRUCTORS
92  } >RAM
93  PROVIDE (__EXCEPT_START__ = .);
94  .gcc_except_table   : { *(.gcc_except_table) } >RAM
95  PROVIDE (__EXCEPT_END__ = .);
96
97  .data1          : { *(.data1)         } >RAM
98  .got1           : { *(.got1)          } >RAM
99  .dynamic        : { *(.dynamic)       } >RAM
100  /* Put .ctors and .dtors next to the .got2 section, so that the pointers
101     get relocated with -mrelocatable. Also put in the .fixup pointers.
102     The current compiler no longer needs this, but keep it around for 2.7.2  */
103                PROVIDE (_GOT2_START_ = .);
104  .got2           :  { *(.got2) }       >RAM
105                PROVIDE (__GOT2_END__ = .);
106                PROVIDE (__CTOR_LIST__ = .);
107  .ctors          : { *(.ctors) }       >RAM
108                PROVIDE (__CTOR_END__ = .);
109                PROVIDE (__DTOR_LIST__ = .);
110  .dtors          : { *(.dtors) }       >RAM
111                PROVIDE (__DTOR_END__ = .);
112                PROVIDE (_FIXUP_START_ = .);
113  .fixup          : { *(.fixup) }       >RAM
114                PROVIDE (_FIXUP_END_ = .);
115                PROVIDE (__FIXUP_END__ = .);
116                PROVIDE (_GOT2_END_ = .);
117                PROVIDE (_GOT_START_ = .);
118  s.got = .;
119  .got            : { *(.got) }         >RAM
120  .got.plt        : { *(.got.plt) }     >RAM
121                PROVIDE (_GOT_END_ = .);
122                PROVIDE (__GOT_END__ = .);
123  /* We want the small data sections together, so single-instruction offsets
124     can access them all, and initialized data all before uninitialized, so
125     we can shorten the on-disk segment size.  */
126  PROVIDE (__SDATA_START__ = .);
127  .sdata          : { *(.sdata) }       >RAM
128  _edata  =  .;
129  PROVIDE (edata = .);
130  PROVIDE (RAM_END = 10M);
131  . =  ALIGN(8) + 0x1000;
132  PROVIDE (__SBSS_START__ = .);
133  .sbss      :
134  {
135    PROVIDE (__sbss_start = .);
136    *(.sbss)
137    *(.scommon)
138    PROVIDE (__sbss_end = .);
139  } >RAM
140  PROVIDE (__SBSS_END__ = .);
141  .bss       :
142  {
143   PROVIDE (__bss_start = .);
144   *(.dynbss)
145   *(.bss)
146   *(COMMON)
147  } >RAM
148  . =  ALIGN(8) + 0x8000;
149  PROVIDE (__stack = .);
150  _end = . ;
151  PROVIDE (end = .);
152
153  /* These are needed for ELF backends which have not yet been
154     converted to the new style linker.  */
155  .stab 0 : { *(.stab) }
156  .stabstr 0 : { *(.stabstr) }
157  /* DWARF debug sections.
158     Symbols in the DWARF debugging sections are relative to the beginning
159     of the section so we begin them at 0.  */
160  /* DWARF 1 */
161  .debug          0 : { *(.debug) }
162  .line           0 : { *(.line) }
163  /* GNU DWARF 1 extensions */
164  .debug_srcinfo  0 : { *(.debug_srcinfo) }
165  .debug_sfnames  0 : { *(.debug_sfnames) }
166  /* DWARF 1.1 and DWARF 2 */
167  .debug_aranges  0 : { *(.debug_aranges) }
168  .debug_pubnames 0 : { *(.debug_pubnames) }
169  /* DWARF 2 */
170  .debug_info     0 : { *(.debug_info) }
171  .debug_abbrev   0 : { *(.debug_abbrev) }
172  .debug_line     0 : { *(.debug_line) }
173  .debug_frame    0 : { *(.debug_frame) }
174  .debug_str      0 : { *(.debug_str) }
175  .debug_loc      0 : { *(.debug_loc) }
176  .debug_macinfo  0 : { *(.debug_macinfo) }
177  /* SGI/MIPS DWARF 2 extensions */
178  .debug_weaknames 0 : { *(.debug_weaknames) }
179  .debug_funcnames 0 : { *(.debug_funcnames) }
180  .debug_typenames 0 : { *(.debug_typenames) }
181  .debug_varnames  0 : { *(.debug_varnames) }
182  /* These must appear regardless of  .  */
183}
Note: See TracBrowser for help on using the repository browser.