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