Statistics
| Branch: | Revision:

root / hppa.ld @ a74cdab4

History | View | Annotate | Download (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
  .eh_frame       : ONLY_IF_RO { KEEP (*(.eh_frame)) }
79 f54b3f92 aurel32
  .gcc_except_table   : ONLY_IF_RO { *(.gcc_except_table .gcc_except_table.*) }
80 f54b3f92 aurel32
  /* Adjust the address for the data segment.  We want to adjust up to
81 f54b3f92 aurel32
     the same address within the page on the next page up.  */
82 f54b3f92 aurel32
  . = ALIGN(0x10000) + (. & (0x10000 - 1));
83 f54b3f92 aurel32
  /* Exception handling  */
84 f54b3f92 aurel32
  .eh_frame       : ONLY_IF_RW { KEEP (*(.eh_frame)) }
85 f54b3f92 aurel32
  .gcc_except_table   : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) }
86 f54b3f92 aurel32
  /* Thread Local Storage sections  */
87 f54b3f92 aurel32
  .tdata	  : { *(.tdata .tdata.* .gnu.linkonce.td.*) }
88 f54b3f92 aurel32
  .tbss		  : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) }
89 f54b3f92 aurel32
  .preinit_array     :
90 f54b3f92 aurel32
  {
91 f54b3f92 aurel32
    PROVIDE_HIDDEN (__preinit_array_start = .);
92 f54b3f92 aurel32
    KEEP (*(.preinit_array))
93 f54b3f92 aurel32
    PROVIDE_HIDDEN (__preinit_array_end = .);
94 f54b3f92 aurel32
  }
95 f54b3f92 aurel32
  .init_array     :
96 f54b3f92 aurel32
  {
97 f54b3f92 aurel32
     PROVIDE_HIDDEN (__init_array_start = .);
98 f54b3f92 aurel32
     KEEP (*(SORT(.init_array.*)))
99 f54b3f92 aurel32
     KEEP (*(.init_array))
100 f54b3f92 aurel32
     PROVIDE_HIDDEN (__init_array_end = .);
101 f54b3f92 aurel32
  }
102 f54b3f92 aurel32
  .fini_array     :
103 f54b3f92 aurel32
  {
104 f54b3f92 aurel32
    PROVIDE_HIDDEN (__fini_array_start = .);
105 f54b3f92 aurel32
    KEEP (*(.fini_array))
106 f54b3f92 aurel32
    KEEP (*(SORT(.fini_array.*)))
107 f54b3f92 aurel32
    PROVIDE_HIDDEN (__fini_array_end = .);
108 f54b3f92 aurel32
  }
109 f54b3f92 aurel32
  .ctors          :
110 f54b3f92 aurel32
  {
111 f54b3f92 aurel32
    /* gcc uses crtbegin.o to find the start of
112 f54b3f92 aurel32
       the constructors, so we make sure it is
113 f54b3f92 aurel32
       first.  Because this is a wildcard, it
114 f54b3f92 aurel32
       doesn't matter if the user does not
115 f54b3f92 aurel32
       actually link against crtbegin.o; the
116 f54b3f92 aurel32
       linker won't look for a file to match a
117 f54b3f92 aurel32
       wildcard.  The wildcard also means that it
118 f54b3f92 aurel32
       doesn't matter which directory crtbegin.o
119 f54b3f92 aurel32
       is in.  */
120 f54b3f92 aurel32
    KEEP (*crtbegin*.o(.ctors))
121 f54b3f92 aurel32
    /* We don't want to include the .ctor section from
122 f54b3f92 aurel32
       the crtend.o file until after the sorted ctors.
123 f54b3f92 aurel32
       The .ctor section from the crtend file contains the
124 f54b3f92 aurel32
       end of ctors marker and it must be last */
125 f54b3f92 aurel32
    KEEP (*(EXCLUDE_FILE (*crtend*.o ) .ctors))
126 f54b3f92 aurel32
    KEEP (*(SORT(.ctors.*)))
127 f54b3f92 aurel32
    KEEP (*(.ctors))
128 f54b3f92 aurel32
  }
129 f54b3f92 aurel32
  .dtors          :
130 f54b3f92 aurel32
  {
131 f54b3f92 aurel32
    KEEP (*crtbegin*.o(.dtors))
132 f54b3f92 aurel32
    KEEP (*(EXCLUDE_FILE (*crtend*.o ) .dtors))
133 f54b3f92 aurel32
    KEEP (*(SORT(.dtors.*)))
134 f54b3f92 aurel32
    KEEP (*(.dtors))
135 f54b3f92 aurel32
  }
136 f54b3f92 aurel32
  .jcr            : { KEEP (*(.jcr)) }
137 f54b3f92 aurel32
  .data.rel.ro : { *(.data.rel.ro.local* .gnu.linkonce.d.rel.ro.local.*) *(.data.rel.ro* .gnu.linkonce.d.rel.ro.*) }
138 f54b3f92 aurel32
  .dynamic        : { *(.dynamic) }
139 f54b3f92 aurel32
  .data           :
140 f54b3f92 aurel32
  {
141 f54b3f92 aurel32
    PROVIDE ($global$ = .);
142 f54b3f92 aurel32
    *(.data .data.* .gnu.linkonce.d.*)
143 f54b3f92 aurel32
    KEEP (*(.gnu.linkonce.d.*personality*))
144 f54b3f92 aurel32
    SORT(CONSTRUCTORS)
145 f54b3f92 aurel32
  }
146 f54b3f92 aurel32
  .data1          : { *(.data1) }
147 f54b3f92 aurel32
  .plt            : { *(.plt) }
148 f54b3f92 aurel32
  .got            : { *(.got.plt) *(.got) }
149 f54b3f92 aurel32
  /* We want the small data sections together, so single-instruction offsets
150 f54b3f92 aurel32
     can access them all, and initialized data all before uninitialized, so
151 f54b3f92 aurel32
     we can shorten the on-disk segment size.  */
152 f54b3f92 aurel32
  .sdata          :
153 f54b3f92 aurel32
  {
154 f54b3f92 aurel32
    *(.sdata .sdata.* .gnu.linkonce.s.*)
155 f54b3f92 aurel32
  }
156 f54b3f92 aurel32
  _edata = .; PROVIDE (edata = .);
157 f54b3f92 aurel32
  __bss_start = .;
158 f54b3f92 aurel32
  .sbss           :
159 f54b3f92 aurel32
  {
160 f54b3f92 aurel32
    *(.dynsbss)
161 f54b3f92 aurel32
    *(.sbss .sbss.* .gnu.linkonce.sb.*)
162 f54b3f92 aurel32
    *(.scommon)
163 f54b3f92 aurel32
  }
164 f54b3f92 aurel32
  .bss            :
165 f54b3f92 aurel32
  {
166 f54b3f92 aurel32
   *(.dynbss)
167 f54b3f92 aurel32
   *(.bss .bss.* .gnu.linkonce.b.*)
168 f54b3f92 aurel32
   *(COMMON)
169 f54b3f92 aurel32
   /* Align here to ensure that the .bss section occupies space up to
170 f54b3f92 aurel32
      _end.  Align after .bss to ensure correct alignment even if the
171 f54b3f92 aurel32
      .bss section disappears because there are no input sections.
172 f54b3f92 aurel32
      FIXME: Why do we need it? When there is no .bss section, we don't
173 f54b3f92 aurel32
      pad the .data section.  */
174 f54b3f92 aurel32
   . = ALIGN(. != 0 ? 32 / 8 : 1);
175 f54b3f92 aurel32
  }
176 f54b3f92 aurel32
  . = ALIGN(32 / 8);
177 f54b3f92 aurel32
  . = ALIGN(32 / 8);
178 f54b3f92 aurel32
  _end = .; PROVIDE (end = .);
179 f54b3f92 aurel32
  /* Stabs debugging sections.  */
180 f54b3f92 aurel32
  .stab          0 : { *(.stab) }
181 f54b3f92 aurel32
  .stabstr       0 : { *(.stabstr) }
182 f54b3f92 aurel32
  .stab.excl     0 : { *(.stab.excl) }
183 f54b3f92 aurel32
  .stab.exclstr  0 : { *(.stab.exclstr) }
184 f54b3f92 aurel32
  .stab.index    0 : { *(.stab.index) }
185 f54b3f92 aurel32
  .stab.indexstr 0 : { *(.stab.indexstr) }
186 f54b3f92 aurel32
  .comment       0 : { *(.comment) }
187 f54b3f92 aurel32
  /* DWARF debug sections.
188 f54b3f92 aurel32
     Symbols in the DWARF debugging sections are relative to the beginning
189 f54b3f92 aurel32
     of the section so we begin them at 0.  */
190 f54b3f92 aurel32
  /* DWARF 1 */
191 f54b3f92 aurel32
  .debug          0 : { *(.debug) }
192 f54b3f92 aurel32
  .line           0 : { *(.line) }
193 f54b3f92 aurel32
  /* GNU DWARF 1 extensions */
194 f54b3f92 aurel32
  .debug_srcinfo  0 : { *(.debug_srcinfo) }
195 f54b3f92 aurel32
  .debug_sfnames  0 : { *(.debug_sfnames) }
196 f54b3f92 aurel32
  /* DWARF 1.1 and DWARF 2 */
197 f54b3f92 aurel32
  .debug_aranges  0 : { *(.debug_aranges) }
198 f54b3f92 aurel32
  .debug_pubnames 0 : { *(.debug_pubnames) }
199 f54b3f92 aurel32
  /* DWARF 2 */
200 f54b3f92 aurel32
  .debug_info     0 : { *(.debug_info .gnu.linkonce.wi.*) }
201 f54b3f92 aurel32
  .debug_abbrev   0 : { *(.debug_abbrev) }
202 f54b3f92 aurel32
  .debug_line     0 : { *(.debug_line) }
203 f54b3f92 aurel32
  .debug_frame    0 : { *(.debug_frame) }
204 f54b3f92 aurel32
  .debug_str      0 : { *(.debug_str) }
205 f54b3f92 aurel32
  .debug_loc      0 : { *(.debug_loc) }
206 f54b3f92 aurel32
  .debug_macinfo  0 : { *(.debug_macinfo) }
207 f54b3f92 aurel32
  /* SGI/MIPS DWARF 2 extensions */
208 f54b3f92 aurel32
  .debug_weaknames 0 : { *(.debug_weaknames) }
209 f54b3f92 aurel32
  .debug_funcnames 0 : { *(.debug_funcnames) }
210 f54b3f92 aurel32
  .debug_typenames 0 : { *(.debug_typenames) }
211 f54b3f92 aurel32
  .debug_varnames  0 : { *(.debug_varnames) }
212 f54b3f92 aurel32
  /DISCARD/ : { *(.note.GNU-stack) }
213 f54b3f92 aurel32
}