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