xref: /netbsd-src/sys/arch/powerpc/conf/kern.ldscript (revision a5847cc334d9a7029f6352b847e9e8d71a0f9e0c)
1/* $NetBSD: kern.ldscript,v 1.4 2011/02/12 18:23:09 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    __stub_pmap_start = .;
22    *(.stub.pmap)
23    __stub_pmap_end = .;
24    *(.gnu.warning)
25  } =0
26  _etext = .;
27  PROVIDE (etext = .);
28  .rodata    : { *(.rodata) *(.rodata.*) }
29  .reginfo : { *(.reginfo) }
30/*  . = . + 0x1000; */
31  .data    :
32  {
33    _fdata = . ;
34    *(.data)
35    CONSTRUCTORS
36  }
37  .data1			: { *(.data1) }
38  . = ALIGN(32);	/* COHERENCY UNIT */
39  .data.cacheline_aligned	: { *(.data.cacheline_aligned) }
40  . = ALIGN(32);	/* COHERENCY UNIT */
41  .data.read_mostly		: { *(.data.read_mostly) }
42  . = ALIGN(32);	/* COHERENCY UNIT */
43  _gp = ALIGN(16) + 0x7ff0;
44  .lit8 : { *(.lit8) }
45  .lit4 : { *(.lit4) }
46  .sdata     : { *(.sdata) }
47  _edata  =  .;
48  PROVIDE (edata = .);
49  __bss_start = .;
50  _fbss = .;
51  .sbss      : { *(.sbss) *(.scommon) }
52  .bss       :
53  {
54   *(.bss)
55   *(COMMON)
56  }
57  _end = . ;
58  PROVIDE (end = .);
59  /* These are needed for ELF backends which have not yet been
60     converted to the new style linker.  */
61  .stab 0 : { *(.stab) }
62  .stabstr 0 : { *(.stabstr) }
63  /* DWARF debug sections.
64     Symbols in the .debug DWARF section are relative to the beginning of the
65     section so we begin .debug at 0.  It's not clear yet what needs to happen
66     for the others.   */
67  .debug          0 : { *(.debug) }
68  .debug_srcinfo  0 : { *(.debug_srcinfo) }
69  .debug_aranges  0 : { *(.debug_aranges) }
70  .debug_pubnames 0 : { *(.debug_pubnames) }
71  .debug_sfnames  0 : { *(.debug_sfnames) }
72  .line           0 : { *(.line) }
73  /* These must appear regardless of  .  */
74  .gptab.sdata : { *(.gptab.data) *(.gptab.sdata) }
75  .gptab.sbss : { *(.gptab.bss) *(.gptab.sbss) }
76}
77