xref: /DragonStub/gnuefi/elf_x86_64_efi.lds (revision 11a459ba967bcdaed8c31c6ce4bbfb7ec54f8233)
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 : { *(.hash) }	/* this MUST come first! */
10  . = ALIGN(4096);
11  .eh_frame :
12  {
13    *(.eh_frame)
14  }
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   *(.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  _edata = .;
50  _data_size = . - _etext;
51  . = ALIGN(4096);
52  .dynamic  : { *(.dynamic) }
53  . = ALIGN(4096);
54  .rela :
55  {
56    *(.rela.data*)
57    *(.rela.got)
58    *(.rela.stab)
59  }
60  . = ALIGN(4096);
61  .dynsym   : { *(.dynsym) }
62  . = ALIGN(4096);
63  .dynstr   : { *(.dynstr) }
64  . = ALIGN(4096);
65  .ignored.reloc :
66  {
67    *(.rela.reloc)
68    *(.eh_frame)
69    *(.note.GNU-stack)
70  }
71  .comment 0 : { *(.comment) }
72}
73