xref: /DragonStub/gnuefi/elf_ia32_efi.lds (revision 02f96e8a2667b3456958b6d69eeb5d68d18cf3e2)
1OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386")
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  .eh_frame : { *(.eh_frame) }
12  .gcc_except_table : { *(.gcc_except_table*) }
13  . = ALIGN(4096);
14  .text :
15  {
16   _text = .;
17   *(.text)
18   *(.text.*)
19   *(.gnu.linkonce.t.*)
20   . = ALIGN(16);
21  }
22  _etext = .;
23  _text_size = . - _text;
24  . = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE));
25  .sdata :
26  {
27   _data = .;
28   *(.got.plt)
29   *(.got)
30   *(.srodata)
31   *(.sdata)
32   *(.sbss)
33   *(.scommon)
34  }
35  . = ALIGN(4096);
36  .data :
37  {
38   *(.rodata*)
39   *(.data)
40   *(.data1)
41   *(.data.*)
42   *(.sdata)
43   *(.got.plt)
44   *(.got)
45   /* the EFI loader doesn't seem to like a .bss section, so we stick
46      it all into .data: */
47   *(.sbss)
48   *(.scommon)
49   *(.dynbss)
50   *(.bss*)
51   *(COMMON)
52  }
53  .note.gnu.build-id : { *(.note.gnu.build-id) }
54
55  . = ALIGN(4096);
56  .dynamic  : { *(.dynamic) }
57  . = ALIGN(4096);
58  .rel :
59  {
60    *(.rel.text*)
61    *(.rel.sdata*)
62    *(.rel.data*)
63    *(.rel.got)
64    *(.rel.plt)
65    *(.rel.dyn)
66    *(.rel.stab)
67    *(.data.rel.ro.local)
68    *(.data.rel.local)
69    *(.data.rel.ro)
70    *(.data.rel*)
71  }
72  _edata = .;
73  _data_size = . - _etext;
74  . = ALIGN(4096);
75  .reloc :		/* This is the PECOFF .reloc section! */
76  {
77    *(.reloc)
78  }
79  . = ALIGN(4096);
80  .dynsym   : { *(.dynsym) }
81  . = ALIGN(4096);
82  .dynstr   : { *(.dynstr) }
83  . = ALIGN(4096);
84  . = DATA_SEGMENT_END (.);
85  /DISCARD/ :
86  {
87    *(.rel.reloc)
88    *(.note.GNU-stack)
89  }
90  .comment 0 : { *(.comment) }
91}
92