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