Statistics
| Branch: | Revision:

root / hppa.ld @ 9f4facbc

History | View | Annotate | Download (7.8 kB)

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