xref: /DragonStub/gnuefi/elf_arm_efi.lds (revision b3cc412aadc6448c62224013ce122b5449e67ec3)
1OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm")
2OUTPUT_ARCH(arm)
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  . = ALIGN(4096);
19  .dynamic  : { *(.dynamic) }
20  . = ALIGN(4096);
21  .data :
22  {
23   _data = .;
24   *(.sdata)
25   *(.data)
26   *(.data1)
27   *(.data.*)
28   *(.got.plt)
29   *(.got)
30
31   /*
32    * Note that these aren't the using the GNU "CONSTRUCTOR" output section
33    * command, so they don't start with a size.  Because of p2align and the
34    * end/END definitions, and the fact that they're mergeable, they can also
35    * have NULLs which aren't guaranteed to be at the end.
36    */
37   . = ALIGN(16);
38   _init_array = .;
39   *(SORT(.init_array.*))
40   *(.init_array)
41   _init_array_end = .;
42   __CTOR_LIST__ = .;
43   *(SORT(.ctors.*))
44   *(.ctors)
45   __CTOR_END__ = .;
46   __DTOR_LIST__ = .;
47   *(SORT(.dtors.*))
48   *(.dtors)
49   __DTOR_END__ = .;
50   _fini_array = .;
51   *(SORT(.fini_array.*))
52   *(.fini_array)
53   _fini_array_end = .;
54
55   /* the EFI loader doesn't seem to like a .bss section, so we stick
56      it all into .data: */
57   . = ALIGN(16);
58   _bss = .;
59   *(.sbss)
60   *(.scommon)
61   *(.dynbss)
62   *(.bss)
63   *(.bss.*)
64   *(COMMON)
65   . = ALIGN(16);
66   _bss_end = .;
67  }
68
69  . = ALIGN(4096);
70  .rel :
71  {
72    *(.rel.text*)
73    *(.rel.data*)
74    *(.rel.got)
75    *(.rel.dyn)
76    *(.rel.stab)
77    *(.rel.init_array*)
78    *(.rel.fini_array*)
79    *(.rel.ctors*)
80    *(.rel.dtors*)
81
82  }
83  . = ALIGN(4096);
84  .rel.plt : { *(.rel.plt) }
85  _edata = .;
86  _data_size = . - _etext;
87
88  . = ALIGN(4096);
89  .dynsym   : { *(.dynsym) }
90  . = ALIGN(4096);
91  .dynstr   : { *(.dynstr) }
92  . = ALIGN(4096);
93  .note.gnu.build-id : { *(.note.gnu.build-id) }
94  /DISCARD/ :
95  {
96    *(.rel.reloc)
97    *(.eh_frame)
98    *(.note.GNU-stack)
99  }
100  .comment 0 : { *(.comment) }
101}
102