xref: /netbsd-src/sys/arch/mips/conf/kern.ldscript (revision 2a399c6883d870daece976daec6ffa7bb7f934ce)
1/* $NetBSD: kern.ldscript,v 1.2 1997/06/23 02:40:28 jonathan Exp $ */
2
3/*  ldscript for NetBSD/mips kernels */
4OUTPUT_FORMAT("elf32-littlemips", "elf32-bigmips",
5	      "elf32-littlemips")
6OUTPUT_ARCH(mips)
7ENTRY(_start)
8SEARCH_DIR(/lib);
9/* Do we need any of these?
10   __DYNAMIC = 0;    */
11_DYNAMIC_LINK = 0;
12SECTIONS
13{
14  /*  Read-only sections, merged into text segment.  Assumes the
15      kernel Makefile sets the start address via -Ttext.  */
16  .text      :
17  {
18    _ftext = . ;
19    *(.text)
20    *(.gnu.warning)
21  } =0
22  _etext = .;
23  PROVIDE (etext = .);
24  .rodata    : { *(.rodata)  }
25  .reginfo : { *(.reginfo) }
26  . = . + 0x1000;
27  .data    :
28  {
29    _fdata = . ;
30    *(.data)
31    CONSTRUCTORS
32  }
33  _gp = ALIGN(16) + 0x7ff0;
34  .lit8 : { *(.lit8) }
35  .lit4 : { *(.lit4) }
36  .sdata     : { *(.sdata) }
37  _edata  =  .;
38  PROVIDE (edata = .);
39  __bss_start = .;
40  _fbss = .;
41  .sbss      : { *(.sbss) *(.scommon) }
42  .bss       :
43  {
44   *(.bss)
45   *(COMMON)
46  }
47  _end = . ;
48  PROVIDE (end = .);
49  /* These are needed for ELF backends which have not yet been
50     converted to the new style linker.  */
51  .stab 0 : { *(.stab) }
52  .stabstr 0 : { *(.stabstr) }
53  /* DWARF debug sections.
54     Symbols in the .debug DWARF section are relative to the beginning of the
55     section so we begin .debug at 0.  It's not clear yet what needs to happen
56     for the others.   */
57  .debug          0 : { *(.debug) }
58  .debug_srcinfo  0 : { *(.debug_srcinfo) }
59  .debug_aranges  0 : { *(.debug_aranges) }
60  .debug_pubnames 0 : { *(.debug_pubnames) }
61  .debug_sfnames  0 : { *(.debug_sfnames) }
62  .line           0 : { *(.line) }
63  /* These must appear regardless of  .  */
64  .gptab.sdata : { *(.gptab.data) *(.gptab.sdata) }
65  .gptab.sbss : { *(.gptab.bss) *(.gptab.sbss) }
66}
67