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

4.104.114.84.95
Last change on this file since 39827cc was 39827cc, checked in by Joel Sherrill <joel.sherrill@…>, on 11/17/99 at 17:31:51

Now allows override of base address via -Ttext command to linker.

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