xref: /DragonStub/gnuefi/elf_ia32_fbsd_efi.lds (revision 20110935449a7b378c48ee924b0c8ed049bfae80)
1OUTPUT_FORMAT("elf32-i386-freebsd", "elf32-i386-freebsd", "elf32-i386-freebsd")
2OUTPUT_ARCH(i386)
3ENTRY(_start)
4SECTIONS
5{
6  . = 0;
7  ImageBase = .;
8  /* .hash and/or .gnu.hash MUST come first! */
9  .hash : { *(.hash) }
10  .gnu.hash : { *(.gnu.hash) }
11  . = ALIGN(4096);
12  .text :
13  {
14   _text = .;
15   *(.text)
16   *(.text.*)
17   *(.gnu.linkonce.t.*)
18   . = ALIGN(16);
19  }
20  _etext = .;
21  _text_size = _etext - _text;
22  . = ALIGN(4096);
23  .sdata :
24  {
25   _data = .;
26   *(.got.plt)
27   *(.got)
28   *(.srodata)
29   *(.sdata)
30   *(.sbss)
31   *(.scommon)
32  }
33  . = ALIGN(4096);
34  .data :
35  {
36   *(.rodata*)
37   *(.data)
38   *(.data1)
39   *(.data.*)
40   *(.sdata)
41   *(.got.plt)
42   *(.got)
43
44   /*
45    * Note that these aren't the using the GNU "CONSTRUCTOR" output section
46    * command, so they don't start with a size.  Because of p2align and the
47    * end/END definitions, and the fact that they're mergeable, they can also
48    * have NULLs which aren't guaranteed to be at the end.
49    */
50   . = ALIGN(16);
51   __init_array_start = .;
52   *(SORT(.init_array.*))
53   *(.init_array)
54   __init_array_end = .;
55  . = ALIGN(16);
56   __CTOR_LIST__ = .;
57   *(SORT(.ctors.*))
58   *(.ctors)
59   __CTOR_END__ = .;
60  . = ALIGN(16);
61   __DTOR_LIST__ = .;
62   *(SORT(.dtors.*))
63   *(.dtors)
64   __DTOR_END__ = .;
65   . = ALIGN(16);
66   __fini_array_start = .;
67   *(SORT(.fini_array.*))
68   *(.fini_array)
69   __fini_array_end = .;
70
71   /* the EFI loader doesn't seem to like a .bss section, so we stick
72      it all into .data: */
73   *(.sbss)
74   *(.scommon)
75   *(.dynbss)
76   *(.bss)
77   *(COMMON)
78  }
79  .note.gnu.build-id : { *(.note.gnu.build-id) }
80
81  . = ALIGN(4096);
82  .dynamic  : { *(.dynamic) }
83  . = ALIGN(4096);
84  .rel :
85  {
86    *(.rel.data)
87    *(.rel.data.*)
88    *(.rel.got)
89    *(.rel.stab)
90    *(.rel.init_array*)
91    *(.rel.fini_array*)
92    *(.rel.ctors*)
93    *(.rel.dtors*)
94    *(.data.rel.ro.local)
95    *(.data.rel.local)
96    *(.data.rel.ro)
97    *(.data.rel*)
98  }
99  _edata = .;
100  _data_size = _edata - _etext;
101  . = ALIGN(4096);
102  .reloc :		/* This is the PECOFF .reloc section! */
103  {
104    *(.reloc)
105  }
106  . = ALIGN(4096);
107  .dynsym   : { *(.dynsym) }
108  . = ALIGN(4096);
109  .dynstr   : { *(.dynstr) }
110  . = ALIGN(4096);
111  /DISCARD/ :
112  {
113    *(.rel.reloc)
114    *(.eh_frame)
115    *(.note.GNU-stack)
116  }
117  .comment 0 : { *(.comment) }
118}
119