Home | History | Annotate | Line # | Download | only in conf
kern.ldscript revision 1.18
      1 /*	$NetBSD: kern.ldscript,v 1.18 2016/05/13 10:18:01 maxv Exp $	*/
      2 
      3 #include "assym.h"
      4 
      5 __PAGE_SIZE = 0x1000 ;
      6 
      7 ENTRY(_start)
      8 SECTIONS
      9 {
     10 	.text :
     11 	{
     12 		*(.text)
     13 		*(.text.*)
     14 		*(.stub)
     15 	}
     16 	_etext = . ;
     17 	PROVIDE (etext = .) ;
     18 
     19 	/*
     20 	 * Adjust the address for the rodata segment.  We want to adjust up to
     21 	 * the same address within the page on the next page up.
     22 	 */
     23 	. = ALIGN(0x1000) + (. & (0x1000 - 1));
     24 
     25 	__rodata_start = . ;
     26 	.rodata :
     27 	{
     28 		*(.rodata)
     29 		*(.rodata.*)
     30 	}
     31 
     32 	__data_start = . ;
     33 	.data :
     34 	{
     35 		*(.data)
     36 	}
     37 
     38 	. = ALIGN(COHERENCY_UNIT);
     39 	.data.cacheline_aligned :
     40 	{
     41 		*(.data.cacheline_aligned)
     42 	}
     43 	. = ALIGN(COHERENCY_UNIT);
     44 	.data.read_mostly :
     45 	{
     46 		*(.data.read_mostly)
     47 	}
     48 	. = ALIGN(COHERENCY_UNIT);
     49 
     50 	_edata = . ;
     51 	PROVIDE (edata = .) ;
     52 	__bss_start = . ;
     53 	.bss :
     54 	{
     55 		*(.bss)
     56 		*(.bss.*)
     57 		*(COMMON)
     58 	. = ALIGN(32 / 8);
     59 	}
     60 
     61 	. = ALIGN(__PAGE_SIZE);
     62 
     63 	/* End of the kernel image */
     64 	__kernel_end = . ;
     65 
     66 	_end = . ;
     67 	PROVIDE (end = .) ;
     68 	.note.netbsd.ident :
     69 	{
     70 		KEEP(*(.note.netbsd.ident));
     71 	}
     72 }
     73 
     74 SECTIONS
     75 {
     76 	.text :
     77 	AT (ADDR(.text) & 0x0fffffff)
     78 	{
     79 		*(.text)
     80 	} = 0
     81 }
     82