xref: /DragonStub/gnuefi/elf_x86_64_efi.lds (revision 5abc3858a25fa6774c6e2d89cc5d1d14a9c9f7cb)
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 :
14  {
15    *(.eh_frame)
16  }
17  . = ALIGN(4096);
18  .text :
19  {
20   _text = .;
21   *(.text)
22   *(.text.*)
23   *(.gnu.linkonce.t.*)
24   . = ALIGN(16);
25  }
26  _etext = .;
27  _text_size = . - _text;
28  . = ALIGN(4096);
29  .reloc :
30  {
31   *(.reloc)
32  }
33  . = ALIGN(4096);
34  .data :
35  {
36   _data = .;
37   *(.rodata*)
38   *(.got.plt)
39   *(.got)
40   *(.data*)
41   *(.sdata)
42   /* the EFI loader doesn't seem to like a .bss section, so we stick
43      it all into .data: */
44   *(.sbss)
45   *(.scommon)
46   *(.dynbss)
47   *(.bss)
48   *(COMMON)
49   *(.rel.local)
50  }
51  .note.gnu.build-id : { *(.note.gnu.build-id) }
52
53  _edata = .;
54  _data_size = . - _etext;
55  . = ALIGN(4096);
56  .dynamic  : { *(.dynamic) }
57  . = ALIGN(4096);
58  .rela :
59  {
60    *(.rela.data*)
61    *(.rela.got)
62    *(.rela.stab)
63  }
64  . = ALIGN(4096);
65  .dynsym   : { *(.dynsym) }
66  . = ALIGN(4096);
67  .dynstr   : { *(.dynstr) }
68  . = ALIGN(4096);
69  .ignored.reloc :
70  {
71    *(.rela.reloc)
72    *(.eh_frame)
73    *(.note.GNU-stack)
74  }
75  .comment 0 : { *(.comment) }
76}
77