Home | History | Annotate | Line # | Download | only in conf
ldscript.evbarm revision 1.13
      1 /*	$NetBSD: ldscript.evbarm,v 1.13 2016/02/08 21:08:03 skrll Exp $	*/
      2 
      3 ENTRY(KERNEL_BASE_phys)
      4 SECTIONS
      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 large page
     25      boundary.  */
     26   . = ALIGN(0x10000);
     27   .data    :
     28   {
     29     __data_start = . ;
     30     *(.data)
     31     *(.data.*)
     32   }
     33   .sdata     :
     34   {
     35     *(.sdata)
     36     *(.sdata.*)
     37   }
     38   . = ALIGN(8);
     39   _edata = .;
     40   PROVIDE (edata = .);
     41   __bss_start = .;
     42   __bss_start__ = .;
     43   .sbss      :
     44   {
     45     PROVIDE (__sbss_start = .);
     46     PROVIDE (___sbss_start = .);
     47     *(.dynsbss)
     48     *(.sbss)
     49     *(.sbss.*)
     50     *(.scommon)
     51     PROVIDE (__sbss_end = .);
     52     PROVIDE (___sbss_end = .);
     53   }
     54   .bss       :
     55   {
     56     *(.dynbss)
     57     *(.bss)
     58     *(.bss.*)
     59     *(COMMON)
     60     /* Align here to ensure that the .bss section occupies space up to
     61        _end.  Align after .bss to ensure correct alignment even if the
     62        .bss section disappears because there are no input sections.  */
     63     . = ALIGN(32 / 8);
     64   }
     65   . = ALIGN(32 / 8);
     66   _end = .;
     67   _bss_end__ = . ; __bss_end__ = . ; __end__ = . ;
     68   PROVIDE (end = .);
     69 }
     70 SECTIONS
     71 {
     72   KERNEL_BASE_phys = @KERNEL_BASE_PHYS@;
     73   KERNEL_BASE_virt = @KERNEL_BASE_VIRT@;
     74 
     75   .start (KERNEL_BASE_phys) :
     76   {
     77     *(.start)
     78   } =0
     79 
     80   .text (KERNEL_BASE_virt + ALIGN(SIZEOF(.start), ALIGNOF(.text))) :
     81   AT (LOADADDR(.start) + ALIGN(SIZEOF(.start), ALIGNOF(.text)))
     82   {
     83     *(.text)
     84   } =0
     85 }
     86