xref: /DragonStub/gnuefi/elf_mips64el_efi.lds (revision fd3d9751611a86a1b2e465f6ca3ad68e1531a9f7)
1OUTPUT_FORMAT("elf64-tradlittlemips", "elf64-tradbigmips", "elf64-tradlittlemips")
2OUTPUT_ARCH(mips)
3ENTRY(_start)
4SECTIONS
5{
6  .text 0x0 : {
7    _text = .;
8    *(.text.head)
9    *(.text)
10    *(.text.*)
11    *(.gnu.linkonce.t.*)
12    *(.srodata)
13    *(.rodata*)
14    . = ALIGN(16);
15  }
16  _etext = .;
17  _text_size = . - _text;
18  . = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE));
19  .dynamic  : { *(.dynamic) }
20  . = ALIGN(4096);
21  .data :
22  {
23   _data = .;
24   *(.sdata)
25   *(.data)
26   *(.data1)
27   *(.data.*)
28   *(.got.plt)
29   HIDDEN (_gp = ALIGN (16) + 0x7ff0);
30   *(.got)
31
32   /*
33    * Note that these aren't the using the GNU "CONSTRUCTOR" output section
34    * command, so they don't start with a size.  Because of p2align and the
35    * end/END definitions, and the fact that they're mergeable, they can also
36    * have NULLs which aren't guaranteed to be at the end.
37    */
38   . = ALIGN(16);
39   _init_array = .;
40   *(SORT_BY_NAME(.init_array))
41   _init_array_end = .;
42   __CTOR_LIST__ = .;
43   *(SORT_BY_NAME(.ctors))
44   __CTOR_END__ = .;
45   __DTOR_LIST__ = .;
46   *(SORT_BY_NAME(.dtors))
47   __DTOR_END__ = .;
48   _fini_array = .;
49   *(SORT_BY_NAME(.fini_array))
50   _fini_array_end = .;
51
52   /* the EFI loader doesn't seem to like a .bss section, so we stick
53      it all into .data: */
54   . = ALIGN(16);
55   _bss = .;
56   *(.sbss)
57   *(.scommon)
58   *(.dynbss)
59   *(.bss*)
60   *(COMMON)
61   . = ALIGN(16);
62   _bss_end = .;
63  }
64
65  . = ALIGN(4096);
66  .rel :
67  {
68    *(.rel.text*)
69    *(.rel.data*)
70    *(.rel.got)
71    *(.rel.dyn)
72    *(.rel.stab)
73  }
74  . = ALIGN(4096);
75  .rel.plt : { *(.rel.plt) }
76  _edata = .;
77  _data_size = . - _etext;
78
79  . = ALIGN(4096);
80  .dynsym   : { *(.dynsym) }
81  . = ALIGN(4096);
82  .dynstr   : { *(.dynstr) }
83  . = ALIGN(4096);
84  .note.gnu.build-id : { *(.note.gnu.build-id) }
85  . = DATA_SEGMENT_END (.);
86  /DISCARD/ :
87  {
88    *(.rel.reloc)
89    *(.eh_frame)
90    *(.MIPS.abiflags)
91    *(.note.GNU-stack)
92  }
93  .comment 0 : { *(.comment) }
94}
95