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