source: rtems/c/src/lib/libbsp/m32r/m32rsim/startup/linkcmds @ 9b4422a2

4.115
Last change on this file since 9b4422a2 was 9b4422a2, checked in by Joel Sherrill <joel.sherrill@…>, on 05/03/12 at 15:09:24

Remove All CVS Id Strings Possible Using a Script

Script does what is expected and tries to do it as
smartly as possible.

+ remove occurrences of two blank comment lines

next to each other after Id string line removed.

+ remove entire comment blocks which only exited to

contain CVS Ids

+ If the processing left a blank line at the top of

a file, it was removed.

  • Property mode set to 100644
File size: 8.6 KB
Line 
1/*
2 * Declare some sizes.
3 */
4RamBase = DEFINED(RamBase) ? RamBase : 0x000000;
5RamSize = DEFINED(RamSize) ? RamSize : 0x800000;
6HeapSize = DEFINED(HeapSize) ? HeapSize : 0x0;
7StackSize = DEFINED(StackSize) ? StackSize : 0x1000;
8
9
10/* Default linker script, for normal executables */
11OUTPUT_FORMAT("elf32-m32r", "elf32-m32r",
12              "elf32-m32r")
13OUTPUT_ARCH(m32r)
14ENTRY(_start)
15SEARCH_DIR("/home/joel/work-gnat/svn/m32r-install/m32r-elf/lib");
16SECTIONS
17{
18  /* Read-only sections, merged into text segment: */
19  PROVIDE (__executable_start = 0x100); . = 0x100;
20  .interp         : { *(.interp) }
21  .note.gnu.build-id : { *(.note.gnu.build-id) }
22  .hash           : { *(.hash) }
23  .gnu.hash       : { *(.gnu.hash) }
24  .dynsym         : { *(.dynsym) }
25  .dynstr         : { *(.dynstr) }
26  .gnu.version    : { *(.gnu.version) }
27  .gnu.version_d  : { *(.gnu.version_d) }
28  .gnu.version_r  : { *(.gnu.version_r) }
29  .rel.init       : { *(.rel.init) }
30  .rela.init      : { *(.rela.init) }
31  .rel.text       : { *(.rel.text .rel.text.* .rel.gnu.linkonce.t.*) }
32  .rela.text      : { *(.rela.text .rela.text.* .rela.gnu.linkonce.t.*) }
33  .rel.fini       : { *(.rel.fini) }
34  .rela.fini      : { *(.rela.fini) }
35  .rel.rodata     : { *(.rel.rodata .rel.rodata.* .rel.gnu.linkonce.r.*) }
36  .rela.rodata    : { *(.rela.rodata .rela.rodata.* .rela.gnu.linkonce.r.*) }
37  .rel.data.rel.ro   : { *(.rel.data.rel.ro* .rel.gnu.linkonce.d.rel.ro.*) }
38  .rela.data.rel.ro   : { *(.rela.data.rel.ro* .rela.gnu.linkonce.d.rel.ro.*) }
39  .rel.data       : { *(.rel.data .rel.data.* .rel.gnu.linkonce.d.*) }
40  .rela.data      : { *(.rela.data .rela.data.* .rela.gnu.linkonce.d.*) }
41  .rel.tdata      : { *(.rel.tdata .rel.tdata.* .rel.gnu.linkonce.td.*) }
42  .rela.tdata     : { *(.rela.tdata .rela.tdata.* .rela.gnu.linkonce.td.*) }
43  .rel.tbss       : { *(.rel.tbss .rel.tbss.* .rel.gnu.linkonce.tb.*) }
44  .rela.tbss      : { *(.rela.tbss .rela.tbss.* .rela.gnu.linkonce.tb.*) }
45  .rel.ctors      : { *(.rel.ctors) }
46  .rela.ctors     : { *(.rela.ctors) }
47  .rel.dtors      : { *(.rel.dtors) }
48  .rela.dtors     : { *(.rela.dtors) }
49  .rel.got        : { *(.rel.got) }
50  .rela.got       : { *(.rela.got) }
51  .rel.sdata      : { *(.rel.sdata .rel.sdata.* .rel.gnu.linkonce.s.*) }
52  .rela.sdata     : { *(.rela.sdata .rela.sdata.* .rela.gnu.linkonce.s.*) }
53  .rel.sbss       : { *(.rel.sbss .rel.sbss.* .rel.gnu.linkonce.sb.*) }
54  .rela.sbss      : { *(.rela.sbss .rela.sbss.* .rela.gnu.linkonce.sb.*) }
55  .rel.sdata2     : { *(.rel.sdata2 .rel.sdata2.* .rel.gnu.linkonce.s2.*) }
56  .rela.sdata2    : { *(.rela.sdata2 .rela.sdata2.* .rela.gnu.linkonce.s2.*) }
57  .rel.sbss2      : { *(.rel.sbss2 .rel.sbss2.* .rel.gnu.linkonce.sb2.*) }
58  .rela.sbss2     : { *(.rela.sbss2 .rela.sbss2.* .rela.gnu.linkonce.sb2.*) }
59  .rel.bss        : { *(.rel.bss .rel.bss.* .rel.gnu.linkonce.b.*) }
60  .rela.bss       : { *(.rela.bss .rela.bss.* .rela.gnu.linkonce.b.*) }
61  .rel.plt        : { *(.rel.plt) }
62  .rela.plt       : { *(.rela.plt) }
63  .init           :
64  {
65    KEEP (*(.init))
66  } =0
67  .plt            : { *(.plt) }
68  .text           :
69  {
70    *(.text .stub .text.* .gnu.linkonce.t.*)
71    /* .gnu.warning sections are handled specially by elf32.em.  */
72    *(.gnu.warning)
73  } =0
74  .fini           :
75  {
76    KEEP (*(.fini))
77  } =0
78  PROVIDE (__etext = .);
79  PROVIDE (_etext = .);
80  PROVIDE (etext = .);
81  .rodata         : { *(.rodata .rodata.* .gnu.linkonce.r.*) }
82  .rodata1        : { *(.rodata1) }
83  .sdata2         :
84  {
85    *(.sdata2 .sdata2.* .gnu.linkonce.s2.*)
86  }
87  .sbss2          : { *(.sbss2 .sbss2.* .gnu.linkonce.sb2.*) }
88  .eh_frame_hdr : { *(.eh_frame_hdr) }
89  .eh_frame       : ONLY_IF_RO { KEEP (*(.eh_frame)) }
90  .gcc_except_table   : ONLY_IF_RO { *(.gcc_except_table .gcc_except_table.*) }
91  /* Adjust the address for the data segment.  We want to adjust up to
92     the same address within the page on the next page up.  */
93  . = ALIGN(32) + (. & (32 - 1));
94  /* Exception handling  */
95  .eh_frame       : ONLY_IF_RW { KEEP (*(.eh_frame)) }
96  .gcc_except_table   : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) }
97  /* Thread Local Storage sections  */
98  .tdata          : { *(.tdata .tdata.* .gnu.linkonce.td.*) }
99  .tbss           : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) }
100  .preinit_array     :
101  {
102    PROVIDE_HIDDEN (__preinit_array_start = .);
103    KEEP (*(.preinit_array))
104    PROVIDE_HIDDEN (__preinit_array_end = .);
105  }
106  .init_array     :
107  {
108     PROVIDE_HIDDEN (__init_array_start = .);
109     KEEP (*(SORT(.init_array.*)))
110     KEEP (*(.init_array))
111     PROVIDE_HIDDEN (__init_array_end = .);
112  }
113  .fini_array     :
114  {
115    PROVIDE_HIDDEN (__fini_array_start = .);
116    KEEP (*(.fini_array))
117    KEEP (*(SORT(.fini_array.*)))
118    PROVIDE_HIDDEN (__fini_array_end = .);
119  }
120  .ctors          :
121  {
122    /* gcc uses crtbegin.o to find the start of
123       the constructors, so we make sure it is
124       first.  Because this is a wildcard, it
125       doesn't matter if the user does not
126       actually link against crtbegin.o; the
127       linker won't look for a file to match a
128       wildcard.  The wildcard also means that it
129       doesn't matter which directory crtbegin.o
130       is in.  */
131    KEEP (*crtbegin.o(.ctors))
132    KEEP (*crtbegin?.o(.ctors))
133    /* We don't want to include the .ctor section from
134       the crtend.o file until after the sorted ctors.
135       The .ctor section from the crtend file contains the
136       end of ctors marker and it must be last */
137    KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .ctors))
138    KEEP (*(SORT(.ctors.*)))
139    KEEP (*(.ctors))
140  }
141  .dtors          :
142  {
143    KEEP (*crtbegin.o(.dtors))
144    KEEP (*crtbegin?.o(.dtors))
145    KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .dtors))
146    KEEP (*(SORT(.dtors.*)))
147    KEEP (*(.dtors))
148  }
149  .jcr            : { KEEP (*(.jcr)) }
150  .data.rel.ro : { *(.data.rel.ro.local* .gnu.linkonce.d.rel.ro.local.*) *(.data.rel.ro* .gnu.linkonce.d.rel.ro.*) }
151  .dynamic        : { *(.dynamic) }
152  .data           :
153  {
154    *(.data .data.* .gnu.linkonce.d.*)
155    SORT(CONSTRUCTORS)
156  }
157  .data1          : { *(.data1) }
158  .got            : { *(.got.plt) *(.got) }
159  /* We want the small data sections together, so single-instruction offsets
160     can access them all, and initialized data all before uninitialized, so
161     we can shorten the on-disk segment size.  */
162  .sdata          :
163  {
164    *(.sdata .sdata.* .gnu.linkonce.s.*)
165  }
166  _edata = .; PROVIDE (edata = .);
167  __bss_start = .;
168  .sbss           :
169  {
170    *(.dynsbss)
171    *(.sbss .sbss.* .gnu.linkonce.sb.*)
172    *(.scommon)
173  }
174  .bss            :
175  {
176   *(.dynbss)
177   *(.bss .bss.* .gnu.linkonce.b.*)
178   *(COMMON)
179   /* Align here to ensure that the .bss section occupies space up to
180      _end.  Align after .bss to ensure correct alignment even if the
181      .bss section disappears because there are no input sections.
182      FIXME: Why do we need it? When there is no .bss section, we don't
183      pad the .data section.  */
184   . = ALIGN(. != 0 ? 32 / 8 : 1);
185  }
186  . = ALIGN(32 / 8);
187  . = ALIGN(32 / 8);
188  _end = .; PROVIDE (end = .);
189  . = ALIGN(16);
190
191  . += StackSize;
192  PROVIDE (_stack = .);
193  PROVIDE (WorkAreaBase = .);
194  .  = 0x800000;
195  /* Stabs debugging sections.  */
196  .stab          0 : { *(.stab) }
197  .stabstr       0 : { *(.stabstr) }
198  .stab.excl     0 : { *(.stab.excl) }
199  .stab.exclstr  0 : { *(.stab.exclstr) }
200  .stab.index    0 : { *(.stab.index) }
201  .stab.indexstr 0 : { *(.stab.indexstr) }
202  .comment       0 : { *(.comment) }
203  /* DWARF debug sections.
204     Symbols in the DWARF debugging sections are relative to the beginning
205     of the section so we begin them at 0.  */
206  /* DWARF 1 */
207  .debug          0 : { *(.debug) }
208  .line           0 : { *(.line) }
209  /* GNU DWARF 1 extensions */
210  .debug_srcinfo  0 : { *(.debug_srcinfo) }
211  .debug_sfnames  0 : { *(.debug_sfnames) }
212  /* DWARF 1.1 and DWARF 2 */
213  .debug_aranges  0 : { *(.debug_aranges) }
214  .debug_pubnames 0 : { *(.debug_pubnames) }
215  /* DWARF 2 */
216  .debug_info     0 : { *(.debug_info .gnu.linkonce.wi.*) }
217  .debug_abbrev   0 : { *(.debug_abbrev) }
218  .debug_line     0 : { *(.debug_line) }
219  .debug_frame    0 : { *(.debug_frame) }
220  .debug_str      0 : { *(.debug_str) }
221  .debug_loc      0 : { *(.debug_loc) }
222  .debug_macinfo  0 : { *(.debug_macinfo) }
223  /* SGI/MIPS DWARF 2 extensions */
224  .debug_weaknames 0 : { *(.debug_weaknames) }
225  .debug_funcnames 0 : { *(.debug_funcnames) }
226  .debug_typenames 0 : { *(.debug_typenames) }
227  .debug_varnames  0 : { *(.debug_varnames) }
228  /* DWARF 3 */
229  .debug_pubtypes 0 : { *(.debug_pubtypes) }
230  .debug_ranges   0 : { *(.debug_ranges) }
231  .gnu.attributes 0 : { KEEP (*(.gnu.attributes)) }
232  /* PROVIDE (_stack = 0x800000); */
233  /DISCARD/ : { *(.note.GNU-stack) *(.gnu_debuglink) }
234}
Note: See TracBrowser for help on using the repository browser.