xref: /DragonStub/gnuefi/elf_ia32_efi.lds (revision bc233a7a4b1eef18e85928117d3851bf4bb94836)
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.dyn)
65    *(.rel.stab)
66    *(.data.rel.ro.local)
67    *(.data.rel.local)
68    *(.data.rel.ro)
69    *(.data.rel*)
70  }
71  . = ALIGN(4096);
72  .rel.plt : { *(.rel.plt) }
73  _edata = .;
74  _data_size = . - _etext;
75  . = ALIGN(4096);
76  .reloc :		/* This is the PECOFF .reloc section! */
77  {
78    KEEP (*(.reloc))
79  }
80  . = ALIGN(4096);
81  .dynsym   : { *(.dynsym) }
82  . = ALIGN(4096);
83  .dynstr   : { *(.dynstr) }
84  . = ALIGN(4096);
85  . = DATA_SEGMENT_END (.);
86  /DISCARD/ :
87  {
88    *(.rel.reloc)
89    *(.note.GNU-stack)
90  }
91  .comment 0 : { *(.comment) }
92}
93