xref: /haiku/src/system/ldscripts/sparc/boot_loader_openfirmware.ld (revision 94ba4f6406957ab4cc68b1239910b66ca01e0188)
1e8f58ba4SPulkoMandyOUTPUT_FORMAT("elf64-sparc")
2e8f58ba4SPulkoMandyOUTPUT_ARCH(sparc:v9)
3e8f58ba4SPulkoMandy
4e8f58ba4SPulkoMandyENTRY(_start)
5e8f58ba4SPulkoMandy
6e8f58ba4SPulkoMandySECTIONS
7e8f58ba4SPulkoMandy{
8*94ba4f64SPulkoMandy	. = 0x202000;
9e8f58ba4SPulkoMandy
10e8f58ba4SPulkoMandy	__text_begin = .;
11e8f58ba4SPulkoMandy
12e8f58ba4SPulkoMandy	/* text/read-only data */
13*94ba4f64SPulkoMandy	.text :	{ *(.text.start) /* Make sure entry point is at start of file */
14*94ba4f64SPulkoMandy			  *(.text .text.* .gnu.linkonce.t.*)
15e8f58ba4SPulkoMandy	          *(.rodata .rodata.* .gnu.linkonce.r.*)
16e8f58ba4SPulkoMandy	          *(.sdata2) }
17e8f58ba4SPulkoMandy
18e8f58ba4SPulkoMandy	/* writable data  */
19e8f58ba4SPulkoMandy	/* align to the same offset in the next page (for performance reasons
20e8f58ba4SPulkoMandy	   (not that it really matters in the boot loader)) */
21e8f58ba4SPulkoMandy	. = ALIGN(0x1000) + 0x1000 + (. & (0x1000 - 1));
22e8f58ba4SPulkoMandy
23e8f58ba4SPulkoMandy	.data : {
24e8f58ba4SPulkoMandy		__ctor_list = .;
25e8f58ba4SPulkoMandy		*(.ctors)
26e8f58ba4SPulkoMandy		__ctor_end = .;
27e8f58ba4SPulkoMandy
28e8f58ba4SPulkoMandy		__data_start = .;
29e8f58ba4SPulkoMandy		*(.data .gnu.linkonce.d.*)
30e8f58ba4SPulkoMandy		*(.data.rel.ro.local .data.rel.ro*)
31e8f58ba4SPulkoMandy		*(.got .got2)
32e8f58ba4SPulkoMandy		*(.sdata .sdata.* .gnu.linkonce.s.* .fixup) }
33e8f58ba4SPulkoMandy
34e8f58ba4SPulkoMandy	/* uninitialized data (in same segment as writable data) */
35e8f58ba4SPulkoMandy	__bss_start = .;
36e8f58ba4SPulkoMandy	.bss : { *(.sbss .sbss.* .gnu.linkonce.sb.*)
37e8f58ba4SPulkoMandy
38e8f58ba4SPulkoMandy		*(.bss .bss.* .gnu.linkonce.b.*)
39e8f58ba4SPulkoMandy		. = ALIGN(0x1000);
40e8f58ba4SPulkoMandy	}
41e8f58ba4SPulkoMandy
42e8f58ba4SPulkoMandy	_end = . ;
43e8f58ba4SPulkoMandy
44e8f58ba4SPulkoMandy	/* Strip unnecessary stuff */
45e8f58ba4SPulkoMandy	/DISCARD/ : { *(.comment .note .eh_frame .dtors .debug_* .gnu.attributes) }
46e8f58ba4SPulkoMandy}
47