xref: /DragonStub/gnuefi/elf_arm_efi.lds (revision 4f8b339facb471192e021fffd5db545a0fbddbc3)
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_BY_NAME(.init_array))
40   _init_array_end = .;
41   __CTOR_LIST__ = .;
42   *(SORT_BY_NAME(.ctors))
43   __CTOR_END__ = .;
44   __DTOR_LIST__ = .;
45   *(SORT_BY_NAME(.dtors))
46   __DTOR_END__ = .;
47   _fini_array = .;
48   *(SORT_BY_NAME(.fini_array))
49   _fini_array_end = .;
50
51   /* the EFI loader doesn't seem to like a .bss section, so we stick
52      it all into .data: */
53   . = ALIGN(16);
54   _bss = .;
55   *(.sbss)
56   *(.scommon)
57   *(.dynbss)
58   *(.bss)
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  /DISCARD/ :
86  {
87    *(.rel.reloc)
88    *(.eh_frame)
89    *(.note.GNU-stack)
90  }
91  .comment 0 : { *(.comment) }
92}
93