kern32.ldscript revision 1.16
11.11Suebayasi/*	$NetBSD: kern32.ldscript,v 1.16 2015/08/25 02:59:00 uebayasi Exp $	*/
21.1Smrg
31.16Suebayasi#undef sparc
41.16Suebayasi
51.1Smrg/*
61.1Smrg * Kernel linker script for NetBSD/sparc.  This script is based on
71.1Smrg * elf32_sparc.xn, but puts _etext after all of the read-only sections.
81.1Smrg */
91.1Smrg
101.1SmrgOUTPUT_FORMAT("elf32-sparc", "elf32-sparc",
111.1Smrg	      "elf32-sparc")
121.1SmrgOUTPUT_ARCH(sparc)
131.1SmrgENTRY(_start)
141.1Smrg/* Do we need any of these for elf?
151.1Smrg   __DYNAMIC = 0;    */
161.1SmrgSECTIONS
171.1Smrg{
181.1Smrg  /* Read-only sections, merged into text segment: */
191.5Smartin  . = 0x10000 + SIZEOF_HEADERS;
201.1Smrg  .text      :
211.1Smrg  {
221.1Smrg    *(.text)
231.1Smrg    *(.stub)
241.1Smrg    /* .gnu.warning sections are handled specially by elf32.em.  */
251.1Smrg    *(.gnu.warning)
261.1Smrg    *(.gnu.linkonce.t*)
271.1Smrg  } =0
281.1Smrg  .rodata    : { *(.rodata) *(.gnu.linkonce.r*) }
291.1Smrg  .rodata1   : { *(.rodata1) }
301.1Smrg  _etext = .;
311.1Smrg  PROVIDE (etext = .);
321.8Schs  /* Adjust the address for the data segment.  We push the data segment
331.8Schs     up to the next 4MB boundary so that we can map the text with large
341.8Schs     pages. */
351.8Schs  . = ALIGN(0x400000);
361.1Smrg  kernel_data_start = .;
371.1Smrg  .data    :
381.1Smrg  {
391.1Smrg    *(.data)
401.1Smrg    *(.gnu.linkonce.d*)
411.1Smrg    CONSTRUCTORS
421.1Smrg  }
431.1Smrg  .data1   : { *(.data1) }
441.10Smjf  . = ALIGN(64);	/* COHERENCY_UNIT */
451.10Smjf  .data.cacheline_aligned : { *(.data_cacheline_aligned) }
461.10Smjf  . = ALIGN(64);	/* COHERENCY_UNIT */
471.10Smjf  .data.read_mostly : { *(.data.read_mostly) }
481.10Smjf  . = ALIGN(64);	/* COHERENCY_UNIT */
491.1Smrg  .plt      : { *(.plt)	}
501.1Smrg  .got           : { *(.got.plt) *(.got) }
511.1Smrg  .dynamic       : { *(.dynamic) }
521.1Smrg  /* We want the small data sections together, so single-instruction offsets
531.1Smrg     can access them all, and initialized data all before uninitialized, so
541.1Smrg     we can shorten the on-disk segment size.  */
551.1Smrg  .sdata     : { *(.sdata) }
561.1Smrg  _edata  =  .;
571.1Smrg  PROVIDE (edata = .);
581.1Smrg  __bss_start = .;
591.1Smrg  .sbss      : { *(.sbss) *(.scommon) }
601.1Smrg  .bss       :
611.1Smrg  {
621.11Suebayasi    *(.dynbss)
631.11Suebayasi    *(.bss)
641.11Suebayasi    *(COMMON)
651.1Smrg  }
661.1Smrg  . = ALIGN(32 / 8);
671.1Smrg  _end = . ;
681.1Smrg  PROVIDE (end = .);
691.7Smartin  .note.netbsd.ident :
701.7Smartin  {
711.7Smartin    KEEP(*(.note.netbsd.ident));
721.7Smartin  }
731.1Smrg}
74