Statistics
| Branch: | Revision:

root / hppa.ld @ f54b3f92

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