OpenCores
URL https://opencores.org/ocsvn/altor32/altor32/trunk

Subversion Repositories altor32

[/] [altor32/] [trunk/] [gcc-x64/] [or1knd-elf/] [or1knd-elf/] [lib/] [ldscripts/] [elf32or1k.xc] - Blame information for rev 35

Details | Compare with Previous | View Log

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

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.