xref: /DragonStub/gnuefi/elf_loongarch64_efi.lds (revision f412fd2a1a248b546b7085648dece8d908077fab)
1OUTPUT_FORMAT("elf64-loongarch", "elf64-loongarch", "elf64-loongarch")
2OUTPUT_ARCH(loongarch)
3ENTRY(_start)
4SECTIONS
5{
6  .text 0x0 : {
7    _text = .;
8    *(.text.head)
9    *(.text)
10    *(.text.*)
11    *(.gnu.linkonce.t.*)
12    *(.plt)
13    . = ALIGN(16);
14  }
15  _etext = .;
16  _text_size = _etext - _text;
17  .dynamic  : { *(.dynamic) }
18  .data : ALIGN(4096)
19  {
20   _data = .;
21   *(.sdata)
22   *(.data)
23   *(.data1)
24   *(.data.*)
25   *(.got.plt)
26   *(.got)
27
28   /* the EFI loader doesn't seem to like a .bss section, so we stick
29      it all into .data: */
30   . = ALIGN(16);
31   _bss = .;
32   *(.sbss)
33   *(.scommon)
34   *(.dynbss)
35   *(.bss)
36   *(COMMON)
37   . = ALIGN(16);
38   _bss_end = .;
39  }
40
41  .rela.dyn : { *(.rela.dyn) }
42  .rela.plt : { *(.rela.plt) }
43  .rela.got : { *(.rela.got) }
44  .rela.data : { *(.rela.data) *(.rela.data*) }
45  . = ALIGN(4096);
46  .rodata : { *(.rodata*) }
47  . = ALIGN(512);
48  _edata = .;
49  _data_size = _edata - _data;
50
51  . = ALIGN(4096);
52  .dynsym   : { *(.dynsym) }
53  . = ALIGN(4096);
54  .dynstr   : { *(.dynstr) }
55  . = ALIGN(4096);
56  .note.gnu.build-id : { *(.note.gnu.build-id) }
57  /DISCARD/ :
58  {
59    *(.rel.reloc)
60    *(.eh_frame)
61    *(.note.GNU-stack)
62  }
63  .comment 0 : { *(.comment) }
64}
65