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

Subversion Repositories altor32

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

Details | Compare with Previous | View Log

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

powered by: WebSVN 2.1.0

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