Home | History | Annotate | Line # | Download | only in conf
      1 /*	$NetBSD: kern.ldscript,v 1.13 2021/04/23 08:42:26 simonb Exp $	*/
      2 
      3 #undef sparc
      4 
      5 /*
      6  * Kernel linker script for NetBSD/sparc.  This script is based on
      7  * elf32_sparc.xn, but puts _etext after all of the read-only sections.
      8  */
      9 
     10 OUTPUT_FORMAT("elf32-sparc", "elf32-sparc",
     11 	      "elf32-sparc")
     12 OUTPUT_ARCH(sparc)
     13 ENTRY(_start)
     14 /* Do we need any of these for elf?
     15    __DYNAMIC = 0;    */
     16 SECTIONS
     17 {
     18   /* Read-only sections, merged into text segment: */
     19   . = 0x10000 + SIZEOF_HEADERS;
     20   .text      :
     21   {
     22     *(.text)
     23     *(.text.*)
     24     *(.stub)
     25     /* .gnu.warning sections are handled specially by elf32.em.  */
     26     *(.gnu.warning)
     27     *(.gnu.linkonce.t*)
     28   } =0
     29   .rodata    : { *(.rodata) *(.gnu.linkonce.r*) }
     30   .rodata1   : { *(.rodata1) }
     31   _etext = .;
     32   PROVIDE (etext = .);
     33   /* Adjust the address for the data segment.  We want to adjust up to
     34      the same address within the page on the next page up.  */
     35   . = ALIGN(0x10000) + (. & (0x10000 - 1));
     36   kernel_data_start = .;
     37   .data    :
     38   {
     39     *(.data)
     40     *(.gnu.linkonce.d*)
     41     CONSTRUCTORS
     42   }
     43   .data1   : { *(.data1) }
     44   .plt      : { *(.plt)	}
     45   .got           : { *(.got.plt) *(.got) }
     46   .dynamic       : { *(.dynamic) }
     47   /* We want the small data sections together, so single-instruction offsets
     48      can access them all, and initialized data all before uninitialized, so
     49      we can shorten the on-disk segment size.  */
     50   .sdata     : { *(.sdata) }
     51   _edata  =  .;
     52   PROVIDE (edata = .);
     53   __bss_start = .;
     54   .sbss      : { *(.sbss) *(.scommon) }
     55   .bss       :
     56   {
     57     *(.dynbss)
     58     *(.bss)
     59     *(COMMON)
     60   }
     61   . = ALIGN(32 / 8);
     62   _end = . ;
     63   PROVIDE (end = .);
     64 }
     65