Subversion Repositories QNX 8.QNX8 GNU binutils

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
8 pmbaty 1
GNU ld (GNU Binutils) 2.41
2
  Supported emulations:
3
   elf_x86_64
4
   i386nto
5
using internal linker script:
6
==================================================
7
/* Script for -z combreloc */
8
/* Copyright (C) 2014-2023 Free Software Foundation, Inc.
9
   Copying and distribution of this script, with or without modification,
10
   are permitted in any medium without royalty provided the copyright
11
   notice and this notice are preserved.  */
12
OUTPUT_FORMAT("elf64-x86-64", "elf64-x86-64",
13
	      "elf64-x86-64")
14
OUTPUT_ARCH(i386:x86-64)
15
ENTRY(_start)
16
SEARCH_DIR("=/tmp/qnxsdk/host/qnx8/x86_64/usr/x86_64-pc-nto-qnx8.0.0/lib");
17
SEARCH_DIR("=/tmp/qnxsdk/host/qnx8/x86_64/usr/lib");
18
SEARCH_DIR("=/usr/local/lib");
19
SEARCH_DIR("=/lib");
20
SEARCH_DIR("=/usr/lib");
21
SECTIONS
22
{
23
  /* Read-only sections, merged into text segment: */
24
  PROVIDE (__executable_start = SEGMENT_START("text-segment", 0x400000)); . = SEGMENT_START("text-segment", 0x400000) + SIZEOF_HEADERS;
25
  .interp         : { *(.interp) }
26
  .note.gnu.build-id  : { *(.note.gnu.build-id) }
27
  .hash           : { *(.hash) }
28
  .gnu.hash       : { *(.gnu.hash) }
29
  .dynsym         : { *(.dynsym) }
30
  .dynstr         : { *(.dynstr) }
31
  .gnu.version    : { *(.gnu.version) }
32
  .gnu.version_d  : { *(.gnu.version_d) }
33
  .gnu.version_r  : { *(.gnu.version_r) }
34
  .rela.dyn       :
35
    {
36
      *(.rela.init)
37
      *(.rela.text .rela.text.* .rela.gnu.linkonce.t.*)
38
      *(.rela.fini)
39
      *(.rela.rodata .rela.rodata.* .rela.gnu.linkonce.r.*)
40
      *(.rela.data .rela.data.* .rela.gnu.linkonce.d.*)
41
      *(.rela.tdata .rela.tdata.* .rela.gnu.linkonce.td.*)
42
      *(.rela.tbss .rela.tbss.* .rela.gnu.linkonce.tb.*)
43
      *(.rela.ctors)
44
      *(.rela.dtors)
45
      *(.rela.got)
46
      *(.rela.bss .rela.bss.* .rela.gnu.linkonce.b.*)
47
      *(.rela.ldata .rela.ldata.* .rela.gnu.linkonce.l.*)
48
      *(.rela.lbss .rela.lbss.* .rela.gnu.linkonce.lb.*)
49
      *(.rela.lrodata .rela.lrodata.* .rela.gnu.linkonce.lr.*)
50
      *(.rela.ifunc)
51
    }
52
  .rela.plt       :
53
    {
54
      *(.rela.plt)
55
      PROVIDE_HIDDEN (__rela_iplt_start = .);
56
      *(.rela.iplt)
57
      PROVIDE_HIDDEN (__rela_iplt_end = .);
58
    }
59
  .relr.dyn : { *(.relr.dyn) }
60
  .init           :
61
  {
62
    KEEP (*(SORT_NONE(.init)))
63
  }
64
  .plt            : { *(.plt) *(.iplt) }
65
.plt.got        : { *(.plt.got) }
66
.plt.sec        : { *(.plt.sec) }
67
  .text           :
68
  {
69
    _btext = .;
70
    *(.text.unlikely .text.*_unlikely .text.unlikely.*)
71
    *(.text.exit .text.exit.*)
72
    *(.text.startup .text.startup.*)
73
    *(.text.hot .text.hot.*)
74
    *(SORT(.text.sorted.*))
75
    *(.text .stub .text.* .gnu.linkonce.t.*)
76
    /* .gnu.warning sections are handled specially by elf.em.  */
77
    *(.gnu.warning)
78
  }
79
  .fini           :
80
  {
81
    KEEP (*(SORT_NONE(.fini)))
82
  }
83
  PROVIDE (__etext = .);
84
  PROVIDE (_etext = .);
85
  PROVIDE (etext = .);
86
  .rodata         : { *(.rodata .rodata.* .gnu.linkonce.r.*) }
87
  .rodata1        : { *(.rodata1) }
88
  .eh_frame_hdr   : { *(.eh_frame_hdr) *(.eh_frame_entry .eh_frame_entry.*) }
89
  .eh_frame       : ONLY_IF_RO { KEEP (*(.eh_frame)) *(.eh_frame.*) }
90
  .sframe         : ONLY_IF_RO { *(.sframe) *(.sframe.*) }
91
  .gcc_except_table   : ONLY_IF_RO { *(.gcc_except_table .gcc_except_table.*) }
92
  .gnu_extab   : ONLY_IF_RO { *(.gnu_extab*) }
93
  /* These sections are generated by the Sun/Oracle C++ compiler.  */
94
  .exception_ranges   : ONLY_IF_RO { *(.exception_ranges*) }
95
  /* Adjust the address for the data segment.  We want to adjust up to
96
     the same address within the page on the next page up.  */
97
  . = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE));
98
  /* Exception handling  */
99
  .eh_frame       : ONLY_IF_RW { KEEP (*(.eh_frame)) *(.eh_frame.*) }
100
  .sframe         : ONLY_IF_RW { *(.sframe) *(.sframe.*) }
101
  .gnu_extab      : ONLY_IF_RW { *(.gnu_extab) }
102
  .gcc_except_table   : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) }
103
  .exception_ranges   : ONLY_IF_RW { *(.exception_ranges*) }
104
  /* Thread Local Storage sections  */
105
  .tdata	  :
106
   {
107
     PROVIDE_HIDDEN (__tdata_start = .);
108
     *(.tdata .tdata.* .gnu.linkonce.td.*)
109
   }
110
  .tbss		  : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) }
111
  .preinit_array    :
112
  {
113
    PROVIDE_HIDDEN (__preinit_array_start = .);
114
    KEEP (*(.preinit_array))
115
    PROVIDE_HIDDEN (__preinit_array_end = .);
116
  }
117
  .init_array    :
118
  {
119
    PROVIDE_HIDDEN (__init_array_start = .);
120
    KEEP (*(SORT_BY_INIT_PRIORITY(.init_array.*) SORT_BY_INIT_PRIORITY(.ctors.*)))
121
    KEEP (*(.init_array EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o ) .ctors))
122
    PROVIDE_HIDDEN (__init_array_end = .);
123
  }
124
  .fini_array    :
125
  {
126
    PROVIDE_HIDDEN (__fini_array_start = .);
127
    KEEP (*(SORT_BY_INIT_PRIORITY(.fini_array.*) SORT_BY_INIT_PRIORITY(.dtors.*)))
128
    KEEP (*(.fini_array EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o ) .dtors))
129
    PROVIDE_HIDDEN (__fini_array_end = .);
130
  }
131
  .ctors          :
132
  {
133
    /* gcc uses crtbegin.o to find the start of
134
       the constructors, so we make sure it is
135
       first.  Because this is a wildcard, it
136
       doesn't matter if the user does not
137
       actually link against crtbegin.o; the
138
       linker won't look for a file to match a
139
       wildcard.  The wildcard also means that it
140
       doesn't matter which directory crtbegin.o
141
       is in.  */
142
    KEEP (*crtbegin.o(.ctors))
143
    KEEP (*crtbegin?.o(.ctors))
144
    /* We don't want to include the .ctor section from
145
       the crtend.o file until after the sorted ctors.
146
       The .ctor section from the crtend file contains the
147
       end of ctors marker and it must be last */
148
    KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .ctors))
149
    KEEP (*(SORT(.ctors.*)))
150
    KEEP (*(.ctors))
151
  }
152
  .dtors          :
153
  {
154
    KEEP (*crtbegin.o(.dtors))
155
    KEEP (*crtbegin?.o(.dtors))
156
    KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .dtors))
157
    KEEP (*(SORT(.dtors.*)))
158
    KEEP (*(.dtors))
159
  }
160
  .jcr            : { KEEP (*(.jcr)) }
161
  .data.rel.ro : { *(.data.rel.ro.local* .gnu.linkonce.d.rel.ro.local.*) *(.data.rel.ro .data.rel.ro.* .gnu.linkonce.d.rel.ro.*) }
162
  .dynamic        : { *(.dynamic) }
163
  .got            : { *(.got) *(.igot) }
164
  . = DATA_SEGMENT_RELRO_END (SIZEOF (.got.plt) >= 24 ? 24 : 0, .);
165
  .got.plt        : { *(.got.plt) *(.igot.plt) }
166
  .data           :
167
  {
168
    *(.data .data.* .gnu.linkonce.d.*)
169
    SORT(CONSTRUCTORS)
170
  }
171
  .data1          : { *(.data1) }
172
  _edata = .; PROVIDE (edata = .);
173
  . = .;
174
  __bss_start = .;
175
  .bss            :
176
  {
177
   *(.dynbss)
178
   *(.bss .bss.* .gnu.linkonce.b.*)
179
   *(COMMON)
180
   /* Align here to ensure that the .bss section occupies space up to
181
      _end.  Align after .bss to ensure correct alignment even if the
182
      .bss section disappears because there are no input sections.
183
      FIXME: Why do we need it? When there is no .bss section, we do not
184
      pad the .data section.  */
185
   . = ALIGN(. != 0 ? 64 / 8 : 1);
186
  }
187
  .lbss   :
188
  {
189
    *(.dynlbss)
190
    *(.lbss .lbss.* .gnu.linkonce.lb.*)
191
    *(LARGE_COMMON)
192
  }
193
  . = ALIGN(64 / 8);
194
  . = SEGMENT_START("ldata-segment", .);
195
  .lrodata   ALIGN(CONSTANT (MAXPAGESIZE)) + (. & (CONSTANT (MAXPAGESIZE) - 1)) :
196
  {
197
    *(.lrodata .lrodata.* .gnu.linkonce.lr.*)
198
  }
199
  .ldata   ALIGN(CONSTANT (MAXPAGESIZE)) + (. & (CONSTANT (MAXPAGESIZE) - 1)) :
200
  {
201
    *(.ldata .ldata.* .gnu.linkonce.l.*)
202
    . = ALIGN(. != 0 ? 64 / 8 : 1);
203
  }
204
  . = ALIGN(64 / 8);
205
  _end = .; PROVIDE (end = .);
206
  . = DATA_SEGMENT_END (.);
207
  /* Stabs debugging sections.  */
208
  .stab          0 : { *(.stab) }
209
  .stabstr       0 : { *(.stabstr) }
210
  .stab.excl     0 : { *(.stab.excl) }
211
  .stab.exclstr  0 : { *(.stab.exclstr) }
212
  .stab.index    0 : { *(.stab.index) }
213
  .stab.indexstr 0 : { *(.stab.indexstr) }
214
  .comment 0 (INFO) : { *(.comment); LINKER_VERSION; }
215
  .gnu.build.attributes : { *(.gnu.build.attributes .gnu.build.attributes.*) }
216
  /* DWARF debug sections.
217
     Symbols in the DWARF debugging sections are relative to the beginning
218
     of the section so we begin them at 0.  */
219
  /* DWARF 1.  */
220
  .debug          0 : { *(.debug) }
221
  .line           0 : { *(.line) }
222
  /* GNU DWARF 1 extensions.  */
223
  .debug_srcinfo  0 : { *(.debug_srcinfo) }
224
  .debug_sfnames  0 : { *(.debug_sfnames) }
225
  /* DWARF 1.1 and DWARF 2.  */
226
  .debug_aranges  0 : { *(.debug_aranges) }
227
  .debug_pubnames 0 : { *(.debug_pubnames) }
228
  /* DWARF 2.  */
229
  .debug_info     0 : { *(.debug_info .gnu.linkonce.wi.*) }
230
  .debug_abbrev   0 : { *(.debug_abbrev) }
231
  .debug_line     0 : { *(.debug_line .debug_line.* .debug_line_end) }
232
  .debug_frame    0 : { *(.debug_frame) }
233
  .debug_str      0 : { *(.debug_str) }
234
  .debug_loc      0 : { *(.debug_loc) }
235
  .debug_macinfo  0 : { *(.debug_macinfo) }
236
  /* SGI/MIPS DWARF 2 extensions.  */
237
  .debug_weaknames 0 : { *(.debug_weaknames) }
238
  .debug_funcnames 0 : { *(.debug_funcnames) }
239
  .debug_typenames 0 : { *(.debug_typenames) }
240
  .debug_varnames  0 : { *(.debug_varnames) }
241
  /* DWARF 3.  */
242
  .debug_pubtypes 0 : { *(.debug_pubtypes) }
243
  .debug_ranges   0 : { *(.debug_ranges) }
244
  /* DWARF 5.  */
245
  .debug_addr     0 : { *(.debug_addr) }
246
  .debug_line_str 0 : { *(.debug_line_str) }
247
  .debug_loclists 0 : { *(.debug_loclists) }
248
  .debug_macro    0 : { *(.debug_macro) }
249
  .debug_names    0 : { *(.debug_names) }
250
  .debug_rnglists 0 : { *(.debug_rnglists) }
251
  .debug_str_offsets 0 : { *(.debug_str_offsets) }
252
  .debug_sup      0 : { *(.debug_sup) }
253
  .gnu.attributes 0 : { KEEP (*(.gnu.attributes)) }
254
  /DISCARD/ : { *(.note.GNU-stack) *(.gnu_debuglink) *(.gnu.lto_*) }
255
}
256
 
257
 
258
==================================================