xref: /DragonStub/gnuefi/elf_aarch64_efi.lds (revision cc4ef911ee2ccd47411df410dc161a35b8b35d01)
1OUTPUT_FORMAT("elf64-littleaarch64", "elf64-littleaarch64", "elf64-littleaarch64")
2OUTPUT_ARCH(aarch64)
3ENTRY(_start)
4SECTIONS
5{
6  . = 0;
7  ImageBase = .;
8  /* .hash and/or .gnu.hash MUST come first! */
9  .hash : { *(.hash) }
10  .gnu.hash : { *(.gnu.hash) }
11  . = ALIGN(4096);
12  .eh_frame : { *(.eh_frame) }
13  .gcc_except_table : { *(.gcc_except_table*) }
14  . = ALIGN(4096);
15  .text : {
16    _text = .;
17    *(.text)
18    *(.text.*)
19    *(.gnu.linkonce.t.*)
20    *(.srodata)
21    *(.rodata*)
22    . = ALIGN(16);
23  }
24  _etext = .;
25  _text_size = . - _text;
26  . = ALIGN(4096);
27  .reloc :
28  {
29    KEEP (*(.reloc))
30  }
31  . = ALIGN(65536);
32  .dynamic  : { *(.dynamic) }
33  . = ALIGN(4096);
34  .data :
35  {
36   _data = .;
37   *(.sdata)
38   *(.data)
39   *(.data1)
40   *(.data.*)
41   *(.got.plt)
42   *(.got)
43
44   /* the EFI loader doesn't seem to like a .bss section, so we stick
45      it all into .data: */
46   . = ALIGN(16);
47   _bss = .;
48   *(.sbss)
49   *(.scommon)
50   *(.dynbss)
51   *(.bss*)
52   *(COMMON)
53   *(.rel.local)
54   . = ALIGN(16);
55   _bss_end = .;
56  }
57
58  . = ALIGN(4096);
59  .rela :
60  {
61    *(.rela.text*)
62    *(.rela.data*)
63    *(.rela.got)
64    *(.rela.dyn)
65    *(.rela.stab)
66  }
67  . = ALIGN(4096);
68  .rela.plt : { *(.rela.plt) }
69  . = ALIGN(512);
70  _edata = .;
71  _data_size = . - _data;
72
73  . = ALIGN(4096);
74  .dynsym   : { *(.dynsym) }
75  . = ALIGN(4096);
76  .dynstr   : { *(.dynstr) }
77  . = ALIGN(4096);
78  .note.gnu.build-id : { *(.note.gnu.build-id) }
79  .ignored.reloc :
80  {
81    *(.rela.reloc)
82    *(.note.GNU-stack)
83  }
84  .comment 0 : { *(.comment) }
85}
86