kern.ldscript revision 1.4
11.4Ssimonb/* $NetBSD: kern.ldscript,v 1.4 2001/10/05 05:03:27 simonb Exp $ */
21.1Sjonathan
31.4Ssimonb/*  ldscript for NetBSD/mips kernels and LKMs */
41.1SjonathanOUTPUT_ARCH(mips)
51.1SjonathanENTRY(_start)
61.1SjonathanSEARCH_DIR(/lib);
71.1Sjonathan/* Do we need any of these?
81.1Sjonathan   __DYNAMIC = 0;    */
91.1Sjonathan_DYNAMIC_LINK = 0;
101.1SjonathanSECTIONS
111.1Sjonathan{
121.2Sjonathan  /*  Read-only sections, merged into text segment.  Assumes the
131.2Sjonathan      kernel Makefile sets the start address via -Ttext.  */
141.1Sjonathan  .text      :
151.1Sjonathan  {
161.1Sjonathan    _ftext = . ;
171.1Sjonathan    *(.text)
181.1Sjonathan    *(.gnu.warning)
191.1Sjonathan  } =0
201.1Sjonathan  _etext = .;
211.1Sjonathan  PROVIDE (etext = .);
221.1Sjonathan  .rodata    : { *(.rodata)  }
231.1Sjonathan  .reginfo : { *(.reginfo) }
241.4Ssimonb/*  . = . + 0x1000; */
251.1Sjonathan  .data    :
261.1Sjonathan  {
271.1Sjonathan    _fdata = . ;
281.1Sjonathan    *(.data)
291.1Sjonathan    CONSTRUCTORS
301.1Sjonathan  }
311.1Sjonathan  _gp = ALIGN(16) + 0x7ff0;
321.1Sjonathan  .lit8 : { *(.lit8) }
331.1Sjonathan  .lit4 : { *(.lit4) }
341.1Sjonathan  .sdata     : { *(.sdata) }
351.1Sjonathan  _edata  =  .;
361.1Sjonathan  PROVIDE (edata = .);
371.1Sjonathan  __bss_start = .;
381.1Sjonathan  _fbss = .;
391.1Sjonathan  .sbss      : { *(.sbss) *(.scommon) }
401.1Sjonathan  .bss       :
411.1Sjonathan  {
421.1Sjonathan   *(.bss)
431.1Sjonathan   *(COMMON)
441.1Sjonathan  }
451.1Sjonathan  _end = . ;
461.1Sjonathan  PROVIDE (end = .);
471.1Sjonathan  /* These are needed for ELF backends which have not yet been
481.1Sjonathan     converted to the new style linker.  */
491.1Sjonathan  .stab 0 : { *(.stab) }
501.1Sjonathan  .stabstr 0 : { *(.stabstr) }
511.1Sjonathan  /* DWARF debug sections.
521.1Sjonathan     Symbols in the .debug DWARF section are relative to the beginning of the
531.1Sjonathan     section so we begin .debug at 0.  It's not clear yet what needs to happen
541.1Sjonathan     for the others.   */
551.1Sjonathan  .debug          0 : { *(.debug) }
561.1Sjonathan  .debug_srcinfo  0 : { *(.debug_srcinfo) }
571.1Sjonathan  .debug_aranges  0 : { *(.debug_aranges) }
581.1Sjonathan  .debug_pubnames 0 : { *(.debug_pubnames) }
591.1Sjonathan  .debug_sfnames  0 : { *(.debug_sfnames) }
601.1Sjonathan  .line           0 : { *(.line) }
611.1Sjonathan  /* These must appear regardless of  .  */
621.1Sjonathan  .gptab.sdata : { *(.gptab.data) *(.gptab.sdata) }
631.1Sjonathan  .gptab.sbss : { *(.gptab.bss) *(.gptab.sbss) }
641.1Sjonathan}
65