xref: /DragonStub/gnuefi/elf_x86_64_fbsd_efi.lds (revision 9c5403e1e6269bd47a4c383cfeaf1a4f29db121f)
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
40   /*
41    * Note that these aren't the using the GNU "CONSTRUCTOR" output section
42    * command, so they don't start with a size.  Because of p2align and the
43    * end/END definitions, and the fact that they're mergeable, they can also
44    * have NULLs which aren't guaranteed to be at the end.
45    */
46   . = ALIGN(16);
47   __init_array_start = .;
48   *(SORT(.init_array.*))
49   *(.init_array)
50   __init_array_end = .;
51   __CTOR_LIST__ = .;
52   *(SORT(.ctors.*))
53   *(.ctors)
54   __CTOR_END__ = .;
55   __DTOR_LIST__ = .;
56   *(SORT(.dtors.*))
57   *(.dtors)
58   __DTOR_END__ = .;
59   __fini_array_start = .;
60   *(SORT(.fini_array.*))
61   *(.fini_array)
62   __fini_array_end = .;
63
64   /* the EFI loader doesn't seem to like a .bss section, so we stick
65      it all into .data: */
66   *(.sbss)
67   *(.scommon)
68   *(.dynbss)
69   *(.bss)
70   *(COMMON)
71   *(.rel.local)
72  }
73  .note.gnu.build-id : { *(.note.gnu.build-id) }
74
75  . = ALIGN(4096);
76  .dynamic  : { *(.dynamic) }
77  . = ALIGN(4096);
78  .rela :
79  {
80    *(.rela.data*)
81    *(.rela.got)
82    *(.rela.stab)
83    *(.rela.init_array*)
84    *(.rela.fini_array*)
85    *(.rela.ctors*)
86    *(.rela.dtors*)
87  }
88  _edata = .;
89  _data_size = . - _etext;
90  . = ALIGN(4096);
91  .dynsym   : { *(.dynsym) }
92  . = ALIGN(4096);
93  .dynstr   : { *(.dynstr) }
94  . = ALIGN(4096);
95  .ignored.reloc :
96  {
97    *(.rela.reloc)
98  }
99}
100