xref: /netbsd-src/sys/external/bsd/gnu-efi/dist/gnuefi/elf_x86_64_efi.lds (revision 2f62cc9c12bc202c40224f32c879f81443fee079)
1/*	$NetBSD: elf_x86_64_efi.lds,v 1.1.1.2 2018/08/16 18:17:47 jmcneill Exp $	*/
2
3/* Same as elf_x86_64_fbsd_efi.lds, except for OUTPUT_FORMAT below - KEEP IN SYNC */
4OUTPUT_FORMAT("elf64-x86-64", "elf64-x86-64", "elf64-x86-64")
5OUTPUT_ARCH(i386:x86-64)
6ENTRY(_start)
7SECTIONS
8{
9  . = 0;
10  ImageBase = .;
11  /* .hash and/or .gnu.hash MUST come first! */
12  .hash : { *(.hash) }
13  .gnu.hash : { *(.gnu.hash) }
14  . = ALIGN(4096);
15  .eh_frame :
16  {
17    *(.eh_frame)
18  }
19  . = ALIGN(4096);
20  .text :
21  {
22   _text = .;
23   *(.text)
24   *(.text.*)
25   *(.gnu.linkonce.t.*)
26   . = ALIGN(16);
27  }
28  _etext = .;
29  _text_size = . - _text;
30  . = ALIGN(4096);
31  .reloc :
32  {
33   *(.reloc)
34  }
35  . = ALIGN(4096);
36  .data :
37  {
38   _data = .;
39   *(.rodata*)
40   *(.got.plt)
41   *(.got)
42   *(.data*)
43   *(.sdata)
44   /* the EFI loader doesn't seem to like a .bss section, so we stick
45      it all into .data: */
46   *(.sbss)
47   *(.scommon)
48   *(.dynbss)
49   *(.bss)
50   *(COMMON)
51   *(.rel.local)
52  }
53  .note.gnu.build-id : { *(.note.gnu.build-id) }
54
55  _edata = .;
56  _data_size = . - _etext;
57  . = ALIGN(4096);
58  .dynamic  : { *(.dynamic) }
59  . = ALIGN(4096);
60  .rela :
61  {
62    *(.rela.data*)
63    *(.rela.got)
64    *(.rela.stab)
65  }
66  . = ALIGN(4096);
67  .dynsym   : { *(.dynsym) }
68  . = ALIGN(4096);
69  .dynstr   : { *(.dynstr) }
70  . = ALIGN(4096);
71  .ignored.reloc :
72  {
73    *(.rela.reloc)
74    *(.eh_frame)
75    *(.note.GNU-stack)
76  }
77  .comment 0 : { *(.comment) }
78}
79