Home | History | Annotate | Line # | Download | only in conf
kern.ldscript revision 1.11
      1 /*	$NetBSD: kern.ldscript,v 1.11 2015/08/20 08:36:42 uebayasi Exp $	*/
      2 
      3 OUTPUT_FORMAT("elf64-x86-64", "elf64-x86-64",
      4 	      "elf64-x86-64")
      5 OUTPUT_ARCH(i386:x86-64)
      6 ENTRY(_start)
      7 SECTIONS
      8 {
      9   /* Read-only sections, merged into text segment: */
     10   .text :
     11   {
     12     *(.text)
     13     *(.text.*)
     14     *(.stub)
     15   } =0
     16   _etext = . ;
     17   PROVIDE (etext = .) ;
     18 
     19   .rodata :
     20   {
     21     *(.rodata)
     22     *(.rodata.*)
     23   }
     24 
     25   /* Adjust the address for the data segment.  We want to adjust up to
     26      the same address within the page on the next page up.  */
     27   . = ALIGN(0x100000) + (. & (0x100000 - 1));
     28   __data_start = . ;
     29   .data :
     30   {
     31     *(.data)
     32   }
     33 
     34   . = ALIGN(64);	/* COHERENCY_UNIT */
     35   .data.cacheline_aligned :
     36   {
     37     *(.data.cacheline_aligned)
     38   }
     39   . = ALIGN(64);	/* COHERENCY_UNIT */
     40   .data.read_mostly :
     41   {
     42     *(.data.read_mostly)
     43   }
     44   . = ALIGN(64);	/* COHERENCY_UNIT */
     45 
     46   _edata = . ;
     47   PROVIDE (edata = .) ;
     48   __bss_start = . ;
     49   .bss :
     50   {
     51     *(.bss)
     52     *(.bss.*)
     53     *(COMMON)
     54     . = ALIGN(64 / 8);
     55   }
     56   . = ALIGN(64 / 8);
     57   _end = . ;
     58   PROVIDE (end = .) ;
     59   .note.netbsd.ident :
     60   {
     61     KEEP(*(.note.netbsd.ident));
     62   }
     63 }
     64 SECTIONS
     65 {
     66   .text :
     67   AT (ADDR(.text) & 0x0fffffff)
     68   {
     69     *(.text)
     70   } =0
     71 }
     72