Home | History | Annotate | Line # | Download | only in conf
kern.ldscript revision 1.7
      1  1.5  uebayasi /*	$NetBSD: kern.ldscript,v 1.7 2015/08/21 04:13:23 uebayasi Exp $	*/
      2  1.1   thorpej 
      3  1.2   thorpej OUTPUT_FORMAT("elf32-littlearm", "elf32-bigarm",
      4  1.2   thorpej 	      "elf32-littlearm")
      5  1.1   thorpej OUTPUT_ARCH(arm)
      6  1.1   thorpej ENTRY(KERNEL_BASE_phys)
      7  1.1   thorpej SECTIONS
      8  1.1   thorpej {
      9  1.1   thorpej   /* Kernel start: */
     10  1.7  uebayasi   .start :
     11  1.1   thorpej   {
     12  1.1   thorpej     *(.start)
     13  1.7  uebayasi   }
     14  1.1   thorpej 
     15  1.1   thorpej   /* Read-only sections, merged into text segment: */
     16  1.7  uebayasi   .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.1   thorpej     *(.rodata) *(.rodata.*)
     23  1.7  uebayasi   }
     24  1.4      matt   .ARM.extab   : { *(.ARM.extab* .gnu.linkonce.armextab.*) }
     25  1.4      matt   PROVIDE (__exidx_start = .);
     26  1.4      matt   .ARM.exidx   : { *(.ARM.exidx* .gnu.linkonce.armexidx.*) }
     27  1.4      matt   PROVIDE (__exidx_end = .);
     28  1.1   thorpej   PROVIDE (__etext = .);
     29  1.1   thorpej   PROVIDE (_etext = .);
     30  1.1   thorpej   PROVIDE (etext = .);
     31  1.1   thorpej   /* Adjust the address for the data segment to start on the next page
     32  1.1   thorpej      boundary.  */
     33  1.1   thorpej   . = ALIGN(0x8000);
     34  1.1   thorpej   .data    :
     35  1.1   thorpej   {
     36  1.1   thorpej     __data_start = . ;
     37  1.1   thorpej     *(.data)
     38  1.1   thorpej     *(.data.*)
     39  1.1   thorpej   }
     40  1.3       uwe   .sdata     :
     41  1.1   thorpej   {
     42  1.5  uebayasi     *(.sdata)
     43  1.1   thorpej     *(.sdata.*)
     44  1.1   thorpej   }
     45  1.1   thorpej   _edata = .;
     46  1.1   thorpej   PROVIDE (edata = .);
     47  1.1   thorpej   __bss_start = .;
     48  1.1   thorpej   __bss_start__ = .;
     49  1.1   thorpej   .sbss      :
     50  1.1   thorpej   {
     51  1.1   thorpej     PROVIDE (__sbss_start = .);
     52  1.1   thorpej     PROVIDE (___sbss_start = .);
     53  1.1   thorpej     *(.dynsbss)
     54  1.1   thorpej     *(.sbss)
     55  1.1   thorpej     *(.sbss.*)
     56  1.1   thorpej     *(.scommon)
     57  1.1   thorpej     PROVIDE (__sbss_end = .);
     58  1.1   thorpej     PROVIDE (___sbss_end = .);
     59  1.1   thorpej   }
     60  1.1   thorpej   .bss       :
     61  1.1   thorpej   {
     62  1.6  uebayasi     *(.dynbss)
     63  1.6  uebayasi     *(.bss)
     64  1.6  uebayasi     *(.bss.*)
     65  1.6  uebayasi     *(COMMON)
     66  1.6  uebayasi     /* Align here to ensure that the .bss section occupies space up to
     67  1.6  uebayasi        _end.  Align after .bss to ensure correct alignment even if the
     68  1.6  uebayasi        .bss section disappears because there are no input sections.  */
     69  1.6  uebayasi     . = ALIGN(32 / 8);
     70  1.1   thorpej   }
     71  1.1   thorpej   . = ALIGN(32 / 8);
     72  1.1   thorpej   _end = .;
     73  1.1   thorpej   _bss_end__ = . ; __bss_end__ = . ; __end__ = . ;
     74  1.1   thorpej   PROVIDE (end = .);
     75  1.1   thorpej }
     76  1.7  uebayasi SECTIONS
     77  1.7  uebayasi {
     78  1.7  uebayasi   KERNEL_BASE_phys = 0x0000c000;
     79  1.7  uebayasi   KERNEL_BASE_virt = 0xf000c000;
     80  1.7  uebayasi 
     81  1.7  uebayasi   .start (KERNEL_BASE_phys) :
     82  1.7  uebayasi   {
     83  1.7  uebayasi     *(.start)
     84  1.7  uebayasi   } =0
     85  1.7  uebayasi 
     86  1.7  uebayasi   .text (KERNEL_BASE_virt + SIZEOF(.start)) :
     87  1.7  uebayasi   AT (LOADADDR(.start) + SIZEOF(.start))
     88  1.7  uebayasi   {
     89  1.7  uebayasi     *(.text)
     90  1.7  uebayasi   } =0
     91  1.7  uebayasi }
     92