Home | History | Annotate | Line # | Download | only in conf
kern.ldscript revision 1.8
      1 /* $NetBSD: kern.ldscript,v 1.8 2015/08/20 07:00:49 uebayasi Exp $ */
      2 
      3 /*  ldscript for NetBSD/mips kernels and LKMs */
      4 OUTPUT_ARCH(mips)
      5 ENTRY(_start)
      6 SEARCH_DIR(/lib);
      7 /* Do we need any of these?
      8    __DYNAMIC = 0;    */
      9 _DYNAMIC_LINK = 0;
     10 SECTIONS
     11 {
     12   /*  Read-only sections, merged into text segment.  Assumes the
     13       kernel Makefile sets the start address via -Ttext.  */
     14   .text      :
     15   {
     16     _ftext = . ;
     17     *(.text)
     18     __stub_start = . ;
     19     *(.stub*)
     20     __stub_end = . ;
     21     *(.gnu.warning)
     22   } =0
     23   _etext = .;
     24   PROVIDE (etext = .);
     25   .rodata    : { *(.rodata) *(.rodata.*) }
     26   .reginfo : { *(.reginfo) }
     27 /*  . = . + 0x1000; */
     28   .data    :
     29   {
     30     _fdata = . ;
     31     *(.data)
     32     CONSTRUCTORS
     33     . = ALIGN(32);       /* COHERENCY_UNIT */
     34     *(.data.cacheline_aligned)
     35     . = ALIGN(32);       /* COHERENCY_UNIT */
     36     *(.data.read_mostly)
     37     . = ALIGN(32);       /* COHERENCY_UNIT */
     38   }
     39   _gp = ALIGN(16) + 0x7ff0;
     40   .lit8 : { *(.lit8) }
     41   .lit4 : { *(.lit4) }
     42   .sdata     : { *(.sdata) }
     43   _edata  =  .;
     44   PROVIDE (edata = .);
     45   __bss_start = .;
     46   _fbss = .;
     47   .sbss      : { *(.sbss) *(.scommon) }
     48   .bss       :
     49   {
     50     *(.bss)
     51     *(COMMON)
     52   }
     53   _end = . ;
     54   PROVIDE (end = .);
     55   /* These are needed for ELF backends which have not yet been
     56      converted to the new style linker.  */
     57   .stab 0 : { *(.stab) }
     58   .stabstr 0 : { *(.stabstr) }
     59   /* DWARF debug sections.
     60      Symbols in the .debug DWARF section are relative to the beginning of the
     61      section so we begin .debug at 0.  It's not clear yet what needs to happen
     62      for the others.   */
     63   .debug          0 : { *(.debug) }
     64   /* DWARF 1 */
     65   .debug_srcinfo  0 : { *(.debug_srcinfo) }
     66   .debug_sfnames  0 : { *(.debug_sfnames) }
     67   /* DWARF 1.1 and DWARF 2 */
     68   .debug_aranges  0 : { *(.debug_aranges) }
     69   .debug_pubnames 0 : { *(.debug_pubnames) }
     70   /* DWARF 2 */
     71   .debug_info     0 : { *(.debug_info .gnu.linkonce.wi.*) }
     72   .debug_abbrev   0 : { *(.debug_abbrev) }
     73   .debug_line     0 : { *(.debug_line) }
     74   .debug_frame    0 : { *(.debug_frame) }
     75   .debug_str      0 : { *(.debug_str) }
     76   .debug_loc      0 : { *(.debug_loc) }
     77   .debug_macinfo  0 : { *(.debug_macinfo) }
     78   /* SGI/MIPS DWARF 2 extensions */
     79   .debug_weaknames 0 : { *(.debug_weaknames) }
     80   .debug_funcnames 0 : { *(.debug_funcnames) }
     81   .debug_typenames 0 : { *(.debug_typenames) }
     82   .debug_varnames  0 : { *(.debug_varnames) }
     83   /* DWARF3 */
     84   .debug_pubtypes 0 : { *(.debug_pubtypes) }
     85   .debug_ranges   0 : { *(.debug_ranges) }
     86   /* for GDB */
     87   .mdebug.abi32 : { KEEP(*(.mdebug.abi32)) }
     88   .mdebug.abiN32 : { KEEP(*(.mdebug.abiN32)) }
     89   .mdebug.abi64 : { KEEP(*(.mdebug.abi64)) }
     90   .mdebug.abiO64 : { KEEP(*(.mdebug.abiO64)) }
     91   .mdebug.eabi32 : { KEEP(*(.mdebug.eabi32)) }
     92   .mdebug.eabi64 : { KEEP(*(.mdebug.eabi64)) }
     93   /* These must appear regardless of  .  */
     94   .gptab.sdata : { *(.gptab.data) *(.gptab.sdata) }
     95   .gptab.sbss : { *(.gptab.bss) *(.gptab.sbss) }
     96   /DISCARD/ : { *(.note.GNU-stack) *(.gnu_debuglink) }
     97 }
     98