xref: /DragonStub/gnuefi/elf_x86_64_fbsd_efi.lds (revision d39106b3e415b7f4927f81650ac469bc147c227f)
1/* Same as elf_x86_64_efi.lds, except for OUTPUT_FORMAT below - KEEP IN SYNC */
2OUTPUT_FORMAT("elf64-x86-64-freebsd", "elf64-x86-64-freebsd", "elf64-x86-64-freebsd")
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   . = ALIGN(16);
21  }
22  _etext = .;
23  _text_size = . - _text;
24  .reloc :
25  {
26   *(.reloc)
27  }
28  . = ALIGN(4096);
29  .data :
30  {
31   _data = .;
32   *(.rodata*)
33   *(.got.plt)
34   *(.got)
35   *(.data*)
36   *(.sdata)
37   /* the EFI loader doesn't seem to like a .bss section, so we stick
38      it all into .data: */
39   *(.sbss)
40   *(.scommon)
41   *(.dynbss)
42   *(.bss)
43   *(COMMON)
44   *(.rel.local)
45  }
46  .note.gnu.build-id : { *(.note.gnu.build-id) }
47
48  . = ALIGN(4096);
49  .dynamic  : { *(.dynamic) }
50  . = ALIGN(4096);
51  .rela :
52  {
53    *(.rela.data*)
54    *(.rela.got)
55    *(.rela.stab)
56  }
57  _edata = .;
58  _data_size = . - _etext;
59  . = ALIGN(4096);
60  .dynsym   : { *(.dynsym) }
61  . = ALIGN(4096);
62  .dynstr   : { *(.dynstr) }
63  . = ALIGN(4096);
64  .ignored.reloc :
65  {
66    *(.rela.reloc)
67  }
68}
69