xref: /netbsd/sys/arch/mips/conf/kern.ldscript (revision bf9ec67e)
1/* $NetBSD: kern.ldscript,v 1.4 2001/10/05 05:03:27 simonb Exp $ */
2
3/*  ldscript for NetBSD/mips kernels and LKMs */
4OUTPUT_ARCH(mips)
5ENTRY(_start)
6SEARCH_DIR(/lib);
7/* Do we need any of these?
8   __DYNAMIC = 0;    */
9_DYNAMIC_LINK = 0;
10SECTIONS
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    *(.gnu.warning)
19  } =0
20  _etext = .;
21  PROVIDE (etext = .);
22  .rodata    : { *(.rodata)  }
23  .reginfo : { *(.reginfo) }
24/*  . = . + 0x1000; */
25  .data    :
26  {
27    _fdata = . ;
28    *(.data)
29    CONSTRUCTORS
30  }
31  _gp = ALIGN(16) + 0x7ff0;
32  .lit8 : { *(.lit8) }
33  .lit4 : { *(.lit4) }
34  .sdata     : { *(.sdata) }
35  _edata  =  .;
36  PROVIDE (edata = .);
37  __bss_start = .;
38  _fbss = .;
39  .sbss      : { *(.sbss) *(.scommon) }
40  .bss       :
41  {
42   *(.bss)
43   *(COMMON)
44  }
45  _end = . ;
46  PROVIDE (end = .);
47  /* These are needed for ELF backends which have not yet been
48     converted to the new style linker.  */
49  .stab 0 : { *(.stab) }
50  .stabstr 0 : { *(.stabstr) }
51  /* DWARF debug sections.
52     Symbols in the .debug DWARF section are relative to the beginning of the
53     section so we begin .debug at 0.  It's not clear yet what needs to happen
54     for the others.   */
55  .debug          0 : { *(.debug) }
56  .debug_srcinfo  0 : { *(.debug_srcinfo) }
57  .debug_aranges  0 : { *(.debug_aranges) }
58  .debug_pubnames 0 : { *(.debug_pubnames) }
59  .debug_sfnames  0 : { *(.debug_sfnames) }
60  .line           0 : { *(.line) }
61  /* These must appear regardless of  .  */
62  .gptab.sdata : { *(.gptab.data) *(.gptab.sdata) }
63  .gptab.sbss : { *(.gptab.bss) *(.gptab.sbss) }
64}
65