kern.ldscript revision 1.17
11.12Suebayasi/*	$NetBSD: kern.ldscript,v 1.17 2015/08/25 02:59:00 uebayasi Exp $	*/
21.2Smrg
31.17Suebayasi#undef sparc
41.17Suebayasi
51.2Smrg/*
61.2Smrg * Kernel linker script for NetBSD/sparc64.  This script is based on
71.2Smrg * elf64_sparc.xn, but puts _etext after all of the read-only sections.
81.2Smrg */
91.1SmrgOUTPUT_FORMAT("elf64-sparc", "elf64-sparc",
101.1Smrg	      "elf64-sparc")
111.1SmrgOUTPUT_ARCH(sparc:v9)
121.1SmrgENTRY(_start)
131.1Smrg/* Do we need any of these for elf?
141.1Smrg   __DYNAMIC = 0;    */
151.1SmrgSECTIONS
161.1Smrg{
171.1Smrg  /* Read-only sections, merged into text segment: */
181.6Smartin  . = 0x100000 + SIZEOF_HEADERS;
191.1Smrg  .text      :
201.1Smrg  {
211.1Smrg    *(.text)
221.1Smrg    *(.stub)
231.1Smrg    /* .gnu.warning sections are handled specially by elf32.em.  */
241.1Smrg    *(.gnu.warning)
251.1Smrg    *(.gnu.linkonce.t*)
261.1Smrg  } =0x01000000
271.1Smrg  .rodata    : { *(.rodata) *(.gnu.linkonce.r*) }
281.1Smrg  .rodata1   : { *(.rodata1) }
291.2Smrg  _etext = .;
301.2Smrg  PROVIDE (etext = .);
311.9Schs  /* Adjust the address for the data segment.  We push the data segment
321.9Schs     up to the next 4MB boundary so that we can map the text with large
331.9Schs     pages. */
341.9Schs  . = ALIGN(0x400000);
351.2Smrg  kernel_data_start = .;
361.1Smrg  .data    :
371.1Smrg  {
381.1Smrg    *(.data)
391.1Smrg    *(.gnu.linkonce.d*)
401.1Smrg    CONSTRUCTORS
411.1Smrg  }
421.1Smrg  .data1   : { *(.data1) }
431.11Smjf  . = ALIGN(64);	/* COHERENCY_UNIT */
441.11Smjf  .data.cacheline_aligned	: { *(.data.cacheline_aligned) }
451.11Smjf  . = ALIGN(64);	/* COHERENCY_UNIT */
461.11Smjf  .data.read_mostly		: { *(.data.read_mostly) }
471.11Smjf  . = ALIGN(64);	/* COHERENCY_UNIT */
481.1Smrg  .plt      : { *(.plt)	}
491.1Smrg  .got           : { *(.got.plt) *(.got) }
501.1Smrg  .dynamic       : { *(.dynamic) }
511.1Smrg  /* We want the small data sections together, so single-instruction offsets
521.1Smrg     can access them all, and initialized data all before uninitialized, so
531.1Smrg     we can shorten the on-disk segment size.  */
541.1Smrg  .sdata     : { *(.sdata) }
551.1Smrg  _edata  =  .;
561.1Smrg  PROVIDE (edata = .);
571.1Smrg  __bss_start = .;
581.1Smrg  .sbss      : { *(.sbss) *(.scommon) }
591.1Smrg  .bss       :
601.1Smrg  {
611.12Suebayasi    *(.dynbss)
621.12Suebayasi    *(.bss)
631.12Suebayasi    *(COMMON)
641.1Smrg  }
651.1Smrg  . = ALIGN(64 / 8);
661.1Smrg  _end = . ;
671.1Smrg  PROVIDE (end = .);
681.8Smartin  .note.netbsd.ident :
691.8Smartin  {
701.8Smartin    KEEP(*(.note.netbsd.ident));
711.8Smartin  }
721.1Smrg}
73