xref: /netbsd-src/sys/arch/cats/conf/ldscript.elf (revision bdc22b2e01993381dcefeff2bc9b56ca75a4235c)
1/*	$NetBSD: ldscript.elf,v 1.6 2015/08/23 08:57:25 uebayasi Exp $	*/
2
3ENTRY(KERNEL_BASE_phys)
4SECTIONS
5{
6  /* Kernel start: */
7  .start :
8  {
9    *(.start)
10  }
11
12  /* Read-only sections, merged into text segment: */
13  .text :
14  {
15    *(.text)
16    *(.text.*)
17    *(.stub)
18    *(.glue_7t) *(.glue_7)
19    *(.rodata) *(.rodata.*)
20  }
21  PROVIDE (__etext = .);
22  PROVIDE (_etext = .);
23  PROVIDE (etext = .);
24  /* Adjust the address for the data segment to start on the next page
25     boundary.  */
26  . = ALIGN(0x8000);
27  .data    :
28  {
29    __data_start = . ;
30    *(.data)
31    *(.data.*)
32  }
33  .sdata     :
34  {
35    *(.sdata)
36    *(.sdata.*)
37  }
38  _edata = .;
39  PROVIDE (edata = .);
40  __bss_start = .;
41  __bss_start__ = .;
42  .sbss      :
43  {
44    PROVIDE (__sbss_start = .);
45    PROVIDE (___sbss_start = .);
46    *(.dynsbss)
47    *(.sbss)
48    *(.sbss.*)
49    *(.scommon)
50    PROVIDE (__sbss_end = .);
51    PROVIDE (___sbss_end = .);
52  }
53  .bss       :
54  {
55    *(.dynbss)
56    *(.bss)
57    *(.bss.*)
58    *(COMMON)
59    /* Align here to ensure that the .bss section occupies space up to
60       _end.  Align after .bss to ensure correct alignment even if the
61       .bss section disappears because there are no input sections.  */
62    . = ALIGN(32 / 8);
63  }
64  . = ALIGN(32 / 8);
65  _end = .;
66  _bss_end__ = . ; __bss_end__ = . ; __end__ = . ;
67  PROVIDE (end = .);
68}
69SECTIONS
70{
71  KERNEL_BASE_phys = 0xF0000000;
72  KERNEL_BASE_virt = 0xF0000000;
73
74  .start (KERNEL_BASE_phys) :
75  {
76    *(.start)
77  } =0
78
79  .text (KERNEL_BASE_virt + SIZEOF(.start)) :
80  AT (LOADADDR(.start) + SIZEOF(.start))
81  {
82    *(.text)
83  } =0
84}
85