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