summaryrefslogtreecommitdiff
path: root/sys/arch/amd64/conf/kern.ldscript.2MB
blob: f11c5df7172986f87a5c28dc18536f35f3dc8a32 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
/*	$NetBSD: kern.ldscript.2MB,v 1.3 2010/06/01 22:13:30 mjf Exp $	*/

OUTPUT_FORMAT("elf64-x86-64", "elf64-x86-64",
	      "elf64-x86-64")
OUTPUT_ARCH(i386:x86-64)
ENTRY(_start)
SECTIONS
{
   /* Read-only sections, merged into text segment: */
   .text :
   AT (ADDR(.text))
   {
     *(.text)
     *(.text.*)
     *(.stub)
   } =0
   _etext = . ;
   PROVIDE (etext = .) ;

   .rodata :
   AT (LOADADDR(.text) + (ADDR(.rodata) - ADDR(.text)))
   {
     *(.rodata)
     *(.rodata.*)
   }
 
   /* Adjust the address for the data segment.  We push the data segment
      up to the next 2MB boundary so that we can map the text with large
      pages. */
   . = ALIGN(0x200000);
   __data_start = . ;
   .data :
   AT (LOADADDR(.text) + (ADDR(.data) - ADDR(.text)))
   {
     *(.data)
   }
   . = ALIGN(64);	/* COHERENCY_UNIT */
   .data.cacheline_aligned :
   AT (LOADADDR(.text) + (ADDR(.data.cacheline_aligned) - ADDR(.text)))
   {
     *(.data.cacheline_aligned)
   }
   . = ALIGN(64);	/* COHERENCY_UNIT */
   .data.read_mostly :
   AT (LOADADDR(.text) + (ADDR(.data.read_mostly) - ADDR(.text)))
   {
     *(.data.read_mostly)
   }
   . = ALIGN(64);	/* COHERENCY_UNIT */
   _edata = . ;
   PROVIDE (edata = .) ;
   __bss_start = . ;
   .bss :
   AT (LOADADDR(.text) + (ADDR(.bss) - ADDR(.text)))
   {
     *(.bss)
     *(.bss.*)
     *(COMMON)
     . = ALIGN(64 / 8);
   }
   . = ALIGN(64 / 8);
  _end = . ;
  PROVIDE (end = .) ;
  .note.netbsd.ident :
  {
    KEEP(*(.note.netbsd.ident));
  }
}