source: rtems/c/src/lib/libbsp/powerpc/dmv177/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 05/09/02 at 21:37:30

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