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