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