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