Statistics
| Branch: | Revision:

root / s390.ld @ a74cdab4

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