xref: /DragonStub/gnuefi/elf_ia64_efi.lds (revision 9dbfe1c36558fdbc2574cea7e47e6a473955051d)
1OUTPUT_FORMAT("elf64-ia64-little")
2OUTPUT_ARCH(ia64)
3ENTRY(_start_plabel)
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  __gp = ALIGN (8) + 0x200000;
26  .sdata :
27  {
28   _data = .;
29   *(.got.plt)
30   *(.got)
31   *(.srodata)
32   *(.sdata)
33   *(.sbss)
34   *(.scommon)
35  }
36  . = ALIGN(4096);
37  .data :
38  {
39   *(.rodata*)
40   *(.ctors)
41   *(.data*)
42   *(.gnu.linkonce.d*)
43   *(.plabel)	/* data whose relocs we want to ignore */
44
45   /*
46    * Note that these aren't the using the GNU "CONSTRUCTOR" output section
47    * command, so they don't start with a size.  Because of p2align and the
48    * end/END definitions, and the fact that they're mergeable, they can also
49    * have NULLs which aren't guaranteed to be at the end.
50    */
51   . = ALIGN(16);
52   __init_array_start = .;
53   *(SORT(.init_array.*))
54   *(.init_array)
55   __init_array_end = .;
56  . = ALIGN(16);
57   __CTOR_LIST__ = .;
58   *(SORT(.ctors.*))
59   *(.ctors)
60   __CTOR_END__ = .;
61  . = ALIGN(16);
62   __DTOR_LIST__ = .;
63   *(SORT(.dtors.*))
64   *(.dtors)
65   __DTOR_END__ = .;
66   . = ALIGN(16);
67   __fini_array_start = .;
68   *(SORT(.fini_array.*))
69   *(.fini_array)
70   __fini_array_end = .;
71
72   /* the EFI loader doesn't seem to like a .bss section, so we stick
73      it all into .data: */
74   *(.dynbss)
75   *(.bss*)
76   *(COMMON)
77  }
78  .note.gnu.build-id : { *(.note.gnu.build-id) }
79
80  . = ALIGN(4096);
81  .dynamic  : { *(.dynamic) }
82  . = ALIGN(4096);
83  .rela :
84  {
85    *(.rela.text*)
86    *(.rela.sdata*)
87    *(.rela.data*)
88    *(.rela.got)
89    *(.rela.dyn)
90    *(.rela.gnu.linkonce.d*)
91    *(.rela.stab)
92    *(.rela.init_array*)
93    *(.rela.fini_array*)
94    *(.rela.ctors*)
95    *(.rela.dtors*)
96  }
97  . = ALIGN(4096);
98  .rela.plt : { *(.rela.plt) }
99  _edata = .;
100  _data_size = . - _etext;
101  . = ALIGN(4096);
102  .reloc :		/* This is the PECOFF .reloc section! */
103  {
104    KEEP (*(.reloc))
105  }
106  . = ALIGN(4096);
107  .dynsym   : { *(.dynsym) }
108  . = ALIGN(4096);
109  .dynstr   : { *(.dynstr) }
110  . = DATA_SEGMENT_END (.);
111  /DISCARD/ :
112  {
113    *(.rela.plabel)
114    *(.rela.reloc)
115    *(.IA_64.unwind*)
116    *(.IA64.unwind*)
117  }
118}
119