1OUTPUT_FORMAT("elf32-m68k", "elf32-m68k", "elf32-m68k")
2OUTPUT_ARCH(m68k)
3
4ENTRY(_start)
5SECTIONS
6{
7  . = 0x80000000 + SIZEOF_HEADERS;
8
9  .interp         : { *(.interp) }
10  .note.gnu.build-id  : { *(.note.gnu.build-id) }
11  .hash           : { *(.hash) }
12  .gnu.hash       : { *(.gnu.hash) }
13  .dynsym         : { *(.dynsym) }
14  .dynstr         : { *(.dynstr) }
15  .gnu.version    : { *(.gnu.version) }
16  .gnu.version_d  : { *(.gnu.version_d) }
17  .gnu.version_r  : { *(.gnu.version_r) }
18  .rela.dyn       :
19    {
20      *(.rela.init)
21      *(.rela.text .rela.text.* .rela.gnu.linkonce.t.*)
22      *(.rela.fini)
23      *(.rela.rodata .rela.rodata.* .rela.gnu.linkonce.r.*)
24      *(.rela.data .rela.data.* .rela.gnu.linkonce.d.*)
25      *(.rela.tdata .rela.tdata.* .rela.gnu.linkonce.td.*)
26      *(.rela.tbss .rela.tbss.* .rela.gnu.linkonce.tb.*)
27      *(.rela.ctors)
28      *(.rela.dtors)
29      *(.rela.got)
30      *(.rela.bss .rela.bss.* .rela.gnu.linkonce.b.*)
31      PROVIDE_HIDDEN (__rela_iplt_start = .);
32      *(.rela.iplt)
33      PROVIDE_HIDDEN (__rela_iplt_end = .);
34    }
35  .rela.plt       :
36    {
37      *(.rela.plt)
38    }
39  .init           :
40  {
41    KEEP (*(SORT_NONE(.init)))
42  } =0x4e714e71
43  .plt            : { *(.plt) }
44  .iplt           : { *(.iplt) }
45  .text           :
46  {
47    *(.text.unlikely .text.*_unlikely .text.unlikely.*)
48    *(.text.exit .text.exit.*)
49    *(.text.startup .text.startup.*)
50    *(.text.hot .text.hot.*)
51    *(SORT(.text.sorted.*))
52    *(.text .stub .text.* .gnu.linkonce.t.*)
53    /* .gnu.warning sections are handled specially by elf.em.  */
54    *(.gnu.warning)
55  } =0x4e714e71
56  .fini           :
57  {
58    KEEP (*(SORT_NONE(.fini)))
59  } =0x4e714e71
60  PROVIDE (__etext = .);
61  PROVIDE (_etext = .);
62  PROVIDE (etext = .);
63  .rodata         : { *(.rodata .rodata.* .gnu.linkonce.r.*) }
64  .rodata1        : { *(.rodata1) }
65  .eh_frame_hdr   : { *(.eh_frame_hdr) *(.eh_frame_entry .eh_frame_entry.*) }
66  .eh_frame       : ONLY_IF_RO { KEEP (*(.eh_frame)) *(.eh_frame.*) }
67  .sframe         : ONLY_IF_RO { *(.sframe) *(.sframe.*) }
68  .gcc_except_table   : ONLY_IF_RO { *(.gcc_except_table .gcc_except_table.*) }
69  .gnu_extab   : ONLY_IF_RO { *(.gnu_extab*) }
70  /* These sections are generated by the Sun/Oracle C++ compiler.  */
71  .exception_ranges   : ONLY_IF_RO { *(.exception_ranges*) }
72  /* Adjust the address for the data segment.  We want to adjust up to
73     the same address within the page on the next page up.  */
74  . = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE));
75  /* Exception handling  */
76  .eh_frame       : ONLY_IF_RW { KEEP (*(.eh_frame)) *(.eh_frame.*) }
77  .sframe         : ONLY_IF_RW { *(.sframe) *(.sframe.*) }
78  .gnu_extab      : ONLY_IF_RW { *(.gnu_extab) }
79  .gcc_except_table   : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) }
80  .exception_ranges   : ONLY_IF_RW { *(.exception_ranges*) }
81  /* Thread Local Storage sections  */
82  .tdata	  :
83   {
84     PROVIDE_HIDDEN (__tdata_start = .);
85     *(.tdata .tdata.* .gnu.linkonce.td.*)
86   }
87  .tbss		  : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) }
88  .preinit_array    :
89  {
90    PROVIDE_HIDDEN (__preinit_array_start = .);
91    KEEP (*(.preinit_array))
92    PROVIDE_HIDDEN (__preinit_array_end = .);
93  }
94  .init_array    :
95  {
96    PROVIDE_HIDDEN (__init_array_start = .);
97    KEEP (*(SORT_BY_INIT_PRIORITY(.init_array.*) SORT_BY_INIT_PRIORITY(.ctors.*)))
98    KEEP (*(.init_array EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o ) .ctors))
99    PROVIDE_HIDDEN (__init_array_end = .);
100  }
101  .fini_array    :
102  {
103    PROVIDE_HIDDEN (__fini_array_start = .);
104    KEEP (*(SORT_BY_INIT_PRIORITY(.fini_array.*) SORT_BY_INIT_PRIORITY(.dtors.*)))
105    KEEP (*(.fini_array EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o ) .dtors))
106    PROVIDE_HIDDEN (__fini_array_end = .);
107  }
108  .ctors          :
109  {
110    /* gcc uses crtbegin.o to find the start of
111       the constructors, so we make sure it is
112       first.  Because this is a wildcard, it
113       doesn't matter if the user does not
114       actually link against crtbegin.o; the
115       linker won't look for a file to match a
116       wildcard.  The wildcard also means that it
117       doesn't matter which directory crtbegin.o
118       is in.  */
119    KEEP (*crtbegin.o(.ctors))
120    KEEP (*crtbegin?.o(.ctors))
121    /* We don't want to include the .ctor section from
122       the crtend.o file until after the sorted ctors.
123       The .ctor section from the crtend file contains the
124       end of ctors marker and it must be last */
125    KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .ctors))
126    KEEP (*(SORT(.ctors.*)))
127    KEEP (*(.ctors))
128  }
129  .dtors          :
130  {
131    KEEP (*crtbegin.o(.dtors))
132    KEEP (*crtbegin?.o(.dtors))
133    KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .dtors))
134    KEEP (*(SORT(.dtors.*)))
135    KEEP (*(.dtors))
136  }
137  .jcr            : { KEEP (*(.jcr)) }
138  .data.rel.ro : { *(.data.rel.ro.local* .gnu.linkonce.d.rel.ro.local.*) *(.data.rel.ro .data.rel.ro.* .gnu.linkonce.d.rel.ro.*) }
139  .dynamic        : { *(.dynamic) }
140  . = DATA_SEGMENT_RELRO_END (0, .);
141  .got            : { *(.got.plt) *(.igot.plt) *(.got) *(.igot) }
142  .data           :
143  {
144    *(.data .data.* .gnu.linkonce.d.*)
145    SORT(CONSTRUCTORS)
146  }
147  .data1          : { *(.data1) }
148  _edata = .; PROVIDE (edata = .);
149  . = .;
150  __bss_start = .;
151  .bss            :
152  {
153   *(.dynbss)
154   *(.bss .bss.* .gnu.linkonce.b.*)
155   *(COMMON)
156   /* Align here to ensure that the .bss section occupies space up to
157      _end.  Align after .bss to ensure correct alignment even if the
158      .bss section disappears because there are no input sections.
159      FIXME: Why do we need it? When there is no .bss section, we do not
160      pad the .data section.  */
161   . = ALIGN(. != 0 ? 32 / 8 : 1);
162  }
163  . = ALIGN(32 / 8);
164  . = SEGMENT_START("ldata-segment", .);
165  . = ALIGN(32 / 8);
166  _end = .; PROVIDE (end = .);
167  . = DATA_SEGMENT_END (.);
168  /DISCARD/ : { *(.note.GNU-stack) *(.gnu_debuglink) *(.gnu.lto_*) }
169}
170