xref: /netbsd/sys/arch/powerpc/conf/kern.ldscript (revision 6550d01e)
1/* $NetBSD: kern.ldscript,v 1.3 2011/01/23 17:38:37 matt Exp $ */
2
3/*  ldscript for NetBSD/powerpc kernels and LKMs */
4OUTPUT_ARCH(powerpc)
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    __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  }
34  .data1			: { *(.data1) }
35  . = ALIGN(32);	/* COHERENCY UNIT */
36  .data.cacheline_aligned	: { *(.data.cacheline_aligned) }
37  . = ALIGN(32);	/* COHERENCY UNIT */
38  .data.read_mostly		: { *(.data.read_mostly) }
39  . = ALIGN(32);	/* COHERENCY UNIT */
40  _gp = ALIGN(16) + 0x7ff0;
41  .lit8 : { *(.lit8) }
42  .lit4 : { *(.lit4) }
43  .sdata     : { *(.sdata) }
44  _edata  =  .;
45  PROVIDE (edata = .);
46  __bss_start = .;
47  _fbss = .;
48  .sbss      : { *(.sbss) *(.scommon) }
49  .bss       :
50  {
51   *(.bss)
52   *(COMMON)
53  }
54  _end = . ;
55  PROVIDE (end = .);
56  /* These are needed for ELF backends which have not yet been
57     converted to the new style linker.  */
58  .stab 0 : { *(.stab) }
59  .stabstr 0 : { *(.stabstr) }
60  /* DWARF debug sections.
61     Symbols in the .debug DWARF section are relative to the beginning of the
62     section so we begin .debug at 0.  It's not clear yet what needs to happen
63     for the others.   */
64  .debug          0 : { *(.debug) }
65  .debug_srcinfo  0 : { *(.debug_srcinfo) }
66  .debug_aranges  0 : { *(.debug_aranges) }
67  .debug_pubnames 0 : { *(.debug_pubnames) }
68  .debug_sfnames  0 : { *(.debug_sfnames) }
69  .line           0 : { *(.line) }
70  /* These must appear regardless of  .  */
71  .gptab.sdata : { *(.gptab.data) *(.gptab.sdata) }
72  .gptab.sbss : { *(.gptab.bss) *(.gptab.sbss) }
73}
74