1OUTPUT_FORMAT("elf32-m68k", "elf32-m68k", "elf32-m68k")
2OUTPUT_ARCH(m68k)
3
4ENTRY(_start)
5
6PHDRS
7{
8	/* have a non-loadable program chunk with the headers, then a loadable one
9	 * with the actual data. This eases the work of elf2aout. */
10	headers PT_NULL FILEHDR PHDRS ;
11	text PT_LOAD ;
12}
13
14SECTIONS
15{
16	/* Execution address.
17	 * The NetBSD loader uses this, not sure if it's a ROM constant or not.
18	 */
19	. = 0x04380000;
20	__text_begin = .;
21
22	/* text/read-only data */
23	.text :	{
24			/* Make sure entry point is at start of file. Not required, since
25			 * it is set using ENTRY above, but it looks nicer and makes it
26			 * clearer we jumped at the correct address. */
27			*(.text.start)
28
29			*(.text .text.* .gnu.linkonce.t.*)
30			*(.rodata .rodata.* .gnu.linkonce.r.*)
31			*(.sdata2)
32	} :text
33
34	/*. = ALIGN(0x4);*/
35	.data : {
36		__ctor_list = .;
37		*(.ctors)
38		__ctor_end = .;
39
40		__data_start = .;
41		*(.data .gnu.linkonce.d.*)
42		*(.data.rel.ro.local .data.rel.ro*)
43		*(.got .got2)
44		*(.sdata .sdata.* .gnu.linkonce.s.* .fixup)
45	} :text
46
47	/* uninitialized data (in same segment as writable data) */
48	__bss_start = .;
49	.bss : {
50		*(.sbss .sbss.* .gnu.linkonce.sb.*)
51		*(.bss .bss.* .gnu.linkonce.b.*)
52		. = ALIGN(0x1000);
53	} :text
54
55	_end = . ;
56
57	/* Strip unnecessary stuff */
58	/DISCARD/ : { *(.comment .note .eh_frame .dtors .stab .stabstr .debug* .debug_* .gnu.attributes) }
59}
60