kern.ldscript revision 1.16
1/*	$NetBSD: kern.ldscript,v 1.16 2015/08/24 08:13:07 uebayasi Exp $	*/
2
3/*
4 * Kernel linker script for NetBSD/sparc64.  This script is based on
5 * elf64_sparc.xn, but puts _etext after all of the read-only sections.
6 */
7OUTPUT_FORMAT("elf64-sparc", "elf64-sparc",
8	      "elf64-sparc")
9OUTPUT_ARCH(sparc:v9)
10ENTRY(_start)
11/* Do we need any of these for elf?
12   __DYNAMIC = 0;    */
13SECTIONS
14{
15  /* Read-only sections, merged into text segment: */
16  . = 0x100000 + SIZEOF_HEADERS;
17  .text      :
18  {
19    *(.text)
20    *(.stub)
21    /* .gnu.warning sections are handled specially by elf32.em.  */
22    *(.gnu.warning)
23    *(.gnu.linkonce.t*)
24  } =0x01000000
25  .rodata    : { *(.rodata) *(.gnu.linkonce.r*) }
26  .rodata1   : { *(.rodata1) }
27  _etext = .;
28  PROVIDE (etext = .);
29  /* Adjust the address for the data segment.  We push the data segment
30     up to the next 4MB boundary so that we can map the text with large
31     pages. */
32  . = ALIGN(0x400000);
33  kernel_data_start = .;
34  .data    :
35  {
36    *(.data)
37    *(.gnu.linkonce.d*)
38    CONSTRUCTORS
39  }
40  .data1   : { *(.data1) }
41  . = ALIGN(64);	/* COHERENCY_UNIT */
42  .data.cacheline_aligned	: { *(.data.cacheline_aligned) }
43  . = ALIGN(64);	/* COHERENCY_UNIT */
44  .data.read_mostly		: { *(.data.read_mostly) }
45  . = ALIGN(64);	/* COHERENCY_UNIT */
46  .plt      : { *(.plt)	}
47  .got           : { *(.got.plt) *(.got) }
48  .dynamic       : { *(.dynamic) }
49  /* We want the small data sections together, so single-instruction offsets
50     can access them all, and initialized data all before uninitialized, so
51     we can shorten the on-disk segment size.  */
52  .sdata     : { *(.sdata) }
53  _edata  =  .;
54  PROVIDE (edata = .);
55  __bss_start = .;
56  .sbss      : { *(.sbss) *(.scommon) }
57  .bss       :
58  {
59    *(.dynbss)
60    *(.bss)
61    *(COMMON)
62  }
63  . = ALIGN(64 / 8);
64  _end = . ;
65  PROVIDE (end = .);
66  .note.netbsd.ident :
67  {
68    KEEP(*(.note.netbsd.ident));
69  }
70}
71