xref: /DragonStub/gnuefi/elf_arm_efi.lds (revision 4c6962457f4ce3f4c18774ce6accd8d20ee29f22)
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_start = .;
39   *(SORT(.init_array.*))
40   *(.init_array)
41   __init_array_end = .;
42  . = ALIGN(16);
43   __CTOR_LIST__ = .;
44   *(SORT(.ctors.*))
45   *(.ctors)
46   __CTOR_END__ = .;
47  . = ALIGN(16);
48   __DTOR_LIST__ = .;
49   *(SORT(.dtors.*))
50   *(.dtors)
51   __DTOR_END__ = .;
52   . = ALIGN(16);
53   __fini_array_start = .;
54   *(SORT(.fini_array.*))
55   *(.fini_array)
56   __fini_array_end = .;
57
58   /* the EFI loader doesn't seem to like a .bss section, so we stick
59      it all into .data: */
60   . = ALIGN(16);
61   _bss = .;
62   *(.sbss)
63   *(.scommon)
64   *(.dynbss)
65   *(.bss)
66   *(.bss.*)
67   *(COMMON)
68   . = ALIGN(16);
69   _bss_end = .;
70  }
71
72  . = ALIGN(4096);
73  .rel :
74  {
75    *(.rel.text*)
76    *(.rel.data*)
77    *(.rel.got)
78    *(.rel.dyn)
79    *(.rel.stab)
80    *(.rel.init_array*)
81    *(.rel.fini_array*)
82    *(.rel.ctors*)
83    *(.rel.dtors*)
84
85  }
86  . = ALIGN(4096);
87  .rel.plt : { *(.rel.plt) }
88  _edata = .;
89  _data_size = . - _etext;
90
91  . = ALIGN(4096);
92  .dynsym   : { *(.dynsym) }
93  . = ALIGN(4096);
94  .dynstr   : { *(.dynstr) }
95  . = ALIGN(4096);
96  .note.gnu.build-id : { *(.note.gnu.build-id) }
97  /DISCARD/ :
98  {
99    *(.rel.reloc)
100    *(.eh_frame)
101    *(.note.GNU-stack)
102  }
103  .comment 0 : { *(.comment) }
104}
105