kern.ldscript revision 1.15
1/*	$NetBSD: kern.ldscript,v 1.15 2015/08/25 08:07:24 uebayasi Exp $	*/
2
3#include "assym.h"
4
5ENTRY(_start)
6SECTIONS
7{
8  /* Read-only sections, merged into text segment: */
9  .text :
10  {
11    *(.text)
12    *(.text.*)
13    *(.stub)
14  }
15  _etext = . ;
16  PROVIDE (etext = .) ;
17
18  .rodata :
19  {
20    *(.rodata)
21    *(.rodata.*)
22  }
23
24  /* Adjust the address for the data segment.  We want to adjust up to
25     the same address within the page on the next page up.  */
26  . = ALIGN(0x100000) + (. & (0x100000 - 1));
27  __data_start = . ;
28  .data :
29  {
30    *(.data)
31  }
32
33  . = ALIGN(COHERENCY_UNIT);
34  .data.cacheline_aligned :
35  {
36    *(.data.cacheline_aligned)
37  }
38  . = ALIGN(COHERENCY_UNIT);
39  .data.read_mostly :
40  {
41    *(.data.read_mostly)
42  }
43  . = ALIGN(COHERENCY_UNIT);
44
45  _edata = . ;
46  PROVIDE (edata = .) ;
47  __bss_start = . ;
48  .bss :
49  {
50    *(.bss)
51    *(.bss.*)
52    *(COMMON)
53    . = ALIGN(64 / 8);
54  }
55  . = ALIGN(64 / 8);
56  _end = . ;
57  PROVIDE (end = .) ;
58  .note.netbsd.ident :
59  {
60    KEEP(*(.note.netbsd.ident));
61  }
62}
63SECTIONS
64{
65  .text :
66  AT (ADDR(.text) & 0x0fffffff)
67  {
68    *(.text)
69  } =0
70}
71