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