xref: /DragonStub/gnuefi/elf_ia64_efi.lds (revision 8abf159da65fe091017eaa69bc2c04a1403f342a)
1530d68baSNigel CroxonOUTPUT_FORMAT("elf64-ia64-little")
2530d68baSNigel CroxonOUTPUT_ARCH(ia64)
3530d68baSNigel CroxonENTRY(_start_plabel)
4530d68baSNigel CroxonSECTIONS
5530d68baSNigel Croxon{
6530d68baSNigel Croxon  . = 0;
7530d68baSNigel Croxon  ImageBase = .;
82cc0b085SSergei Trofimovich  /* .hash and/or .gnu.hash MUST come first! */
92cc0b085SSergei Trofimovich  .hash : { *(.hash) }
102cc0b085SSergei Trofimovich  .gnu.hash : { *(.gnu.hash) }
1115f10734SCallum Farmer  .eh_frame : { *(.eh_frame) }
1215f10734SCallum Farmer  .gcc_except_table : { *(.gcc_except_table*) }
13530d68baSNigel Croxon  . = ALIGN(4096);
14530d68baSNigel Croxon  .text :
15530d68baSNigel Croxon  {
1611a459baSNigel Croxon   _text = .;
17530d68baSNigel Croxon   *(.text)
18530d68baSNigel Croxon   *(.text.*)
19530d68baSNigel Croxon   *(.gnu.linkonce.t.*)
20*8abf159dSCallum Farmer   *(.plt)
2111a459baSNigel Croxon   . = ALIGN(16);
22530d68baSNigel Croxon  }
2311a459baSNigel Croxon  _etext = .;
2420110935SCallum Farmer  _text_size = _etext - _text;
25231c7632SCallum Farmer  . = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE));
26530d68baSNigel Croxon  __gp = ALIGN (8) + 0x200000;
27530d68baSNigel Croxon  .sdata :
28530d68baSNigel Croxon  {
2911a459baSNigel Croxon   _data = .;
30530d68baSNigel Croxon   *(.got.plt)
31530d68baSNigel Croxon   *(.got)
32530d68baSNigel Croxon   *(.srodata)
33530d68baSNigel Croxon   *(.sdata)
34530d68baSNigel Croxon   *(.sbss)
35530d68baSNigel Croxon   *(.scommon)
36530d68baSNigel Croxon  }
37530d68baSNigel Croxon  . = ALIGN(4096);
38530d68baSNigel Croxon  .data :
39530d68baSNigel Croxon  {
40530d68baSNigel Croxon   *(.rodata*)
41530d68baSNigel Croxon   *(.ctors)
42530d68baSNigel Croxon   *(.data*)
43530d68baSNigel Croxon   *(.gnu.linkonce.d*)
44530d68baSNigel Croxon   *(.plabel)	/* data whose relocs we want to ignore */
454f8b339fSPeter Jones
464f8b339fSPeter Jones   /*
474f8b339fSPeter Jones    * Note that these aren't the using the GNU "CONSTRUCTOR" output section
484f8b339fSPeter Jones    * command, so they don't start with a size.  Because of p2align and the
494f8b339fSPeter Jones    * end/END definitions, and the fact that they're mergeable, they can also
504f8b339fSPeter Jones    * have NULLs which aren't guaranteed to be at the end.
514f8b339fSPeter Jones    */
524f8b339fSPeter Jones   . = ALIGN(16);
539c5403e1SCallum Farmer   __init_array_start = .;
54e2aa0997SCallum Farmer   *(SORT(.init_array.*))
55e2aa0997SCallum Farmer   *(.init_array)
569c5403e1SCallum Farmer   __init_array_end = .;
579dbfe1c3SCallum Farmer  . = ALIGN(16);
584f8b339fSPeter Jones   __CTOR_LIST__ = .;
59e2aa0997SCallum Farmer   *(SORT(.ctors.*))
60e2aa0997SCallum Farmer   *(.ctors)
614f8b339fSPeter Jones   __CTOR_END__ = .;
629dbfe1c3SCallum Farmer  . = ALIGN(16);
634f8b339fSPeter Jones   __DTOR_LIST__ = .;
64e2aa0997SCallum Farmer   *(SORT(.dtors.*))
65e2aa0997SCallum Farmer   *(.dtors)
664f8b339fSPeter Jones   __DTOR_END__ = .;
679dbfe1c3SCallum Farmer   . = ALIGN(16);
689c5403e1SCallum Farmer   __fini_array_start = .;
69e2aa0997SCallum Farmer   *(SORT(.fini_array.*))
70e2aa0997SCallum Farmer   *(.fini_array)
719c5403e1SCallum Farmer   __fini_array_end = .;
724f8b339fSPeter Jones
73530d68baSNigel Croxon   /* the EFI loader doesn't seem to like a .bss section, so we stick
74530d68baSNigel Croxon      it all into .data: */
75530d68baSNigel Croxon   *(.dynbss)
7615f10734SCallum Farmer   *(.bss*)
77530d68baSNigel Croxon   *(COMMON)
78530d68baSNigel Croxon  }
79d39106b3SNigel Croxon  .note.gnu.build-id : { *(.note.gnu.build-id) }
80d39106b3SNigel Croxon
81530d68baSNigel Croxon  . = ALIGN(4096);
82530d68baSNigel Croxon  .dynamic  : { *(.dynamic) }
83530d68baSNigel Croxon  . = ALIGN(4096);
84530d68baSNigel Croxon  .rela :
85530d68baSNigel Croxon  {
86eea6d31aSCallum Farmer    *(.rela.text*)
87eea6d31aSCallum Farmer    *(.rela.sdata*)
88530d68baSNigel Croxon    *(.rela.data*)
89530d68baSNigel Croxon    *(.rela.got)
9002f96e8aSCallum Farmer    *(.rela.dyn)
91530d68baSNigel Croxon    *(.rela.gnu.linkonce.d*)
92530d68baSNigel Croxon    *(.rela.stab)
93e2aa0997SCallum Farmer    *(.rela.init_array*)
94e2aa0997SCallum Farmer    *(.rela.fini_array*)
95e2aa0997SCallum Farmer    *(.rela.ctors*)
96e2aa0997SCallum Farmer    *(.rela.dtors*)
97530d68baSNigel Croxon  }
981a10c661SCallum Farmer  . = ALIGN(4096);
991a10c661SCallum Farmer  .rela.plt : { *(.rela.plt) }
10011a459baSNigel Croxon  _edata = .;
10120110935SCallum Farmer  _data_size = _edata - _etext;
102530d68baSNigel Croxon  . = ALIGN(4096);
103530d68baSNigel Croxon  .reloc :		/* This is the PECOFF .reloc section! */
104530d68baSNigel Croxon  {
105bc233a7aSCallum Farmer    KEEP (*(.reloc))
106530d68baSNigel Croxon  }
107530d68baSNigel Croxon  . = ALIGN(4096);
108530d68baSNigel Croxon  .dynsym   : { *(.dynsym) }
109530d68baSNigel Croxon  . = ALIGN(4096);
110530d68baSNigel Croxon  .dynstr   : { *(.dynstr) }
111231c7632SCallum Farmer  . = DATA_SEGMENT_END (.);
112530d68baSNigel Croxon  /DISCARD/ :
113530d68baSNigel Croxon  {
114530d68baSNigel Croxon    *(.rela.plabel)
115530d68baSNigel Croxon    *(.rela.reloc)
116530d68baSNigel Croxon    *(.IA_64.unwind*)
117530d68baSNigel Croxon    *(.IA64.unwind*)
118530d68baSNigel Croxon  }
119530d68baSNigel Croxon}
120