11.13Ssimonb/*	$NetBSD: kern.ldscript,v 1.13 2021/04/23 08:42:26 simonb Exp $	*/
21.1Spk
31.12Suebayasi#undef sparc
41.12Suebayasi
51.1Spk/*
61.1Spk * Kernel linker script for NetBSD/sparc.  This script is based on
71.1Spk * elf32_sparc.xn, but puts _etext after all of the read-only sections.
81.1Spk */
91.1Spk
101.1SpkOUTPUT_FORMAT("elf32-sparc", "elf32-sparc",
111.1Spk	      "elf32-sparc")
121.1SpkOUTPUT_ARCH(sparc)
131.1SpkENTRY(_start)
141.1Spk/* Do we need any of these for elf?
151.1Spk   __DYNAMIC = 0;    */
161.1SpkSECTIONS
171.1Spk{
181.1Spk  /* Read-only sections, merged into text segment: */
191.4Smartin  . = 0x10000 + SIZEOF_HEADERS;
201.1Spk  .text      :
211.1Spk  {
221.1Spk    *(.text)
231.13Ssimonb    *(.text.*)
241.1Spk    *(.stub)
251.1Spk    /* .gnu.warning sections are handled specially by elf32.em.  */
261.1Spk    *(.gnu.warning)
271.1Spk    *(.gnu.linkonce.t*)
281.1Spk  } =0
291.1Spk  .rodata    : { *(.rodata) *(.gnu.linkonce.r*) }
301.1Spk  .rodata1   : { *(.rodata1) }
311.1Spk  _etext = .;
321.1Spk  PROVIDE (etext = .);
331.1Spk  /* Adjust the address for the data segment.  We want to adjust up to
341.1Spk     the same address within the page on the next page up.  */
351.1Spk  . = ALIGN(0x10000) + (. & (0x10000 - 1));
361.2Spk  kernel_data_start = .;
371.1Spk  .data    :
381.1Spk  {
391.1Spk    *(.data)
401.1Spk    *(.gnu.linkonce.d*)
411.1Spk    CONSTRUCTORS
421.1Spk  }
431.1Spk  .data1   : { *(.data1) }
441.1Spk  .plt      : { *(.plt)	}
451.1Spk  .got           : { *(.got.plt) *(.got) }
461.1Spk  .dynamic       : { *(.dynamic) }
471.1Spk  /* We want the small data sections together, so single-instruction offsets
481.1Spk     can access them all, and initialized data all before uninitialized, so
491.1Spk     we can shorten the on-disk segment size.  */
501.1Spk  .sdata     : { *(.sdata) }
511.1Spk  _edata  =  .;
521.1Spk  PROVIDE (edata = .);
531.1Spk  __bss_start = .;
541.1Spk  .sbss      : { *(.sbss) *(.scommon) }
551.1Spk  .bss       :
561.1Spk  {
571.6Suebayasi    *(.dynbss)
581.6Suebayasi    *(.bss)
591.6Suebayasi    *(COMMON)
601.1Spk  }
611.1Spk  . = ALIGN(32 / 8);
621.1Spk  _end = . ;
631.1Spk  PROVIDE (end = .);
641.1Spk}
65