Home | History | Annotate | Line # | Download | only in conf
kern.ldscript revision 1.9
      1 /*	$NetBSD: kern.ldscript,v 1.9 2015/08/22 23:49:54 uebayasi Exp $	*/
      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   .interp     : { *(.interp) 	}
     19   .hash          : { *(.hash)		}
     20   .dynsym        : { *(.dynsym)		}
     21   .dynstr        : { *(.dynstr)		}
     22   .gnu.version   : { *(.gnu.version)	}
     23   .gnu.version_d   : { *(.gnu.version_d)	}
     24   .gnu.version_r   : { *(.gnu.version_r)	}
     25   .text      :
     26   {
     27     *(.text)
     28     *(.stub)
     29     /* .gnu.warning sections are handled specially by elf32.em.  */
     30     *(.gnu.warning)
     31     *(.gnu.linkonce.t*)
     32   } =0
     33   .rodata    : { *(.rodata) *(.gnu.linkonce.r*) }
     34   .rodata1   : { *(.rodata1) }
     35   _etext = .;
     36   PROVIDE (etext = .);
     37   /* Adjust the address for the data segment.  We want to adjust up to
     38      the same address within the page on the next page up.  */
     39   . = ALIGN(0x10000) + (. & (0x10000 - 1));
     40   kernel_data_start = .;
     41   .data    :
     42   {
     43     *(.data)
     44     *(.gnu.linkonce.d*)
     45     CONSTRUCTORS
     46   }
     47   .data1   : { *(.data1) }
     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   /* Stabs debugging sections.  */
     69   .stab 0 : { *(.stab) }
     70   .stabstr 0 : { *(.stabstr) }
     71   .stab.excl 0 : { *(.stab.excl) }
     72   .stab.exclstr 0 : { *(.stab.exclstr) }
     73   .stab.index 0 : { *(.stab.index) }
     74   .stab.indexstr 0 : { *(.stab.indexstr) }
     75   .comment 0 : { *(.comment) }
     76   /* DWARF debug sections.
     77      Symbols in the DWARF debugging sections are relative to the beginning
     78      of the section so we begin them at 0.  */
     79   /* DWARF 1 */
     80   .debug          0 : { *(.debug) }
     81   .line           0 : { *(.line) }
     82   /* GNU DWARF 1 extensions */
     83   .debug_srcinfo  0 : { *(.debug_srcinfo) }
     84   .debug_sfnames  0 : { *(.debug_sfnames) }
     85   /* DWARF 1.1 and DWARF 2 */
     86   .debug_aranges  0 : { *(.debug_aranges) }
     87   .debug_pubnames 0 : { *(.debug_pubnames) }
     88   /* DWARF 2 */
     89   .debug_info     0 : { *(.debug_info) }
     90   .debug_abbrev   0 : { *(.debug_abbrev) }
     91   .debug_line     0 : { *(.debug_line) }
     92   .debug_frame    0 : { *(.debug_frame) }
     93   .debug_str      0 : { *(.debug_str) }
     94   .debug_loc      0 : { *(.debug_loc) }
     95   .debug_macinfo  0 : { *(.debug_macinfo) }
     96   /* SGI/MIPS DWARF 2 extensions */
     97   .debug_weaknames 0 : { *(.debug_weaknames) }
     98   .debug_funcnames 0 : { *(.debug_funcnames) }
     99   .debug_typenames 0 : { *(.debug_typenames) }
    100   .debug_varnames  0 : { *(.debug_varnames) }
    101   /* These must appear regardless of  .  */
    102 }
    103