xref: /netbsd-src/sys/arch/epoc32/conf/ldscript.epoc32 (revision dd3ee07da436799d8de85f3055253118b76bf345)
1/*	$NetBSD: ldscript.epoc32,v 1.7 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  .note.netbsd.ident :
69  {
70    KEEP(*(.note.netbsd.ident));
71  }
72}
73SECTIONS
74{
75  KERNEL_BASE_phys = @KERNEL_BASE_PHYS@;
76  KERNEL_BASE_virt = @KERNEL_BASE_VIRT@;
77
78  .start (KERNEL_BASE_phys) :
79  {
80    *(.start)
81  } =0
82
83  .text (KERNEL_BASE_virt + SIZEOF(.start)) :
84  AT (LOADADDR(.start) + SIZEOF(.start))
85  {
86    *(.text)
87  } =0
88}
89