xref: /haiku/src/system/ldscripts/arm64/boot_loader_efi.ld (revision 57a743987cd758ca1018bee05c6c33f5eb69f217)
1*57a74398SFredrik HolmqvistOUTPUT_FORMAT("elf64-littleaarch64")
2*57a74398SFredrik HolmqvistOUTPUT_ARCH(aarch64)
3*57a74398SFredrik HolmqvistENTRY(_start)
4*57a74398SFredrik HolmqvistSECTIONS
5*57a74398SFredrik Holmqvist{
6*57a74398SFredrik Holmqvist	.text 0x0 : {
7*57a74398SFredrik Holmqvist		_text = .;
8*57a74398SFredrik Holmqvist		*(.text.head)
9*57a74398SFredrik Holmqvist		*(.text)
10*57a74398SFredrik Holmqvist		*(.text.*)
11*57a74398SFredrik Holmqvist		*(.gnu.linkonce.t.*)
12*57a74398SFredrik Holmqvist		*(.srodata)
13*57a74398SFredrik Holmqvist		*(.rodata*)
14*57a74398SFredrik Holmqvist		. = ALIGN(16);
15*57a74398SFredrik Holmqvist	}
16*57a74398SFredrik Holmqvist	_etext = .;
17*57a74398SFredrik Holmqvist	_text_size = . - _text;
18*57a74398SFredrik Holmqvist	.dynamic  : { *(.dynamic) }
19*57a74398SFredrik Holmqvist	.data : {
20*57a74398SFredrik Holmqvist		__ctor_list = .;
21*57a74398SFredrik Holmqvist		*(.init_array)
22*57a74398SFredrik Holmqvist		*(.ctors)
23*57a74398SFredrik Holmqvist		__ctor_end = .;
24*57a74398SFredrik Holmqvist		_data = .;
25*57a74398SFredrik Holmqvist		*(.sdata)
26*57a74398SFredrik Holmqvist		*(.data)
27*57a74398SFredrik Holmqvist		*(.data1)
28*57a74398SFredrik Holmqvist		*(.data.*)
29*57a74398SFredrik Holmqvist		*(.got.plt)
30*57a74398SFredrik Holmqvist		*(.got)
31*57a74398SFredrik Holmqvist
32*57a74398SFredrik Holmqvist		/*
33*57a74398SFredrik Holmqvist		 * The EFI loader doesn't seem to like a .bss section, so we
34*57a74398SFredrik Holmqvist		 * stick it all into .data:
35*57a74398SFredrik Holmqvist		 */
36*57a74398SFredrik Holmqvist		. = ALIGN(16);
37*57a74398SFredrik Holmqvist		_bss = .;
38*57a74398SFredrik Holmqvist		*(.sbss)
39*57a74398SFredrik Holmqvist		*(.scommon)
40*57a74398SFredrik Holmqvist		*(.dynbss)
41*57a74398SFredrik Holmqvist		*(.bss)
42*57a74398SFredrik Holmqvist		*(.bss.*)
43*57a74398SFredrik Holmqvist		*(COMMON)
44*57a74398SFredrik Holmqvist		. = ALIGN(16);
45*57a74398SFredrik Holmqvist		_bss_end = .;
46*57a74398SFredrik Holmqvist	}
47*57a74398SFredrik Holmqvist	.rela.dyn : { *(.rela.dyn) }
48*57a74398SFredrik Holmqvist	.rela.plt : { *(.rela.plt) }
49*57a74398SFredrik Holmqvist	.rela.got : { *(.rela.got) }
50*57a74398SFredrik Holmqvist	.rela.data : { *(.rela.data) *(.rela.data*) }
51*57a74398SFredrik Holmqvist
52*57a74398SFredrik Holmqvist	_edata = .;
53*57a74398SFredrik Holmqvist	_data_size = . - _etext;
54*57a74398SFredrik Holmqvist
55*57a74398SFredrik Holmqvist	. = ALIGN(4096);
56*57a74398SFredrik Holmqvist	.dynsym   : { *(.dynsym) }
57*57a74398SFredrik Holmqvist	. = ALIGN(4096);
58*57a74398SFredrik Holmqvist	.dynstr   : { *(.dynstr) }
59*57a74398SFredrik Holmqvist	. = ALIGN(4096);
60*57a74398SFredrik Holmqvist
61*57a74398SFredrik Holmqvist	_end = . ;
62*57a74398SFredrik Holmqvist	.note.gnu.build-id : { *(.note.gnu.build-id) }
63*57a74398SFredrik Holmqvist	/DISCARD/ : {
64*57a74398SFredrik Holmqvist		*(.rel.reloc)
65*57a74398SFredrik Holmqvist		*(.eh_frame)
66*57a74398SFredrik Holmqvist		*(.note.GNU-stack)
67*57a74398SFredrik Holmqvist	}
68*57a74398SFredrik Holmqvist	.comment 0 : { *(.comment) }
69*57a74398SFredrik Holmqvist}
70