Statistics
| Branch: | Revision:

root / s390.ld @ 8c5e95d8

History | View | Annotate | Download (7 kB)

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