Home | History | Annotate | Line # | Download | only in conf
kern.ldscript revision 1.16
      1 /*	$NetBSD: kern.ldscript,v 1.16 2015/11/28 18:08:40 maxv Exp $	*/
      2 
      3 #include "assym.h"
      4 
      5 ENTRY(_start)
      6 SECTIONS
      7 {
      8 	/* Read-only sections, merged into text segment: */
      9 	.text :
     10 	{
     11 		*(.text)
     12 		*(.text.*)
     13 		*(.stub)
     14 	}
     15 	_etext = . ;
     16 	PROVIDE (etext = .) ;
     17 
     18 	.rodata :
     19 	{
     20 		*(.rodata)
     21 		*(.rodata.*)
     22 	}
     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 	 */
     28 	. = ALIGN(0x1000) + (. & (0x1000 - 1));
     29 	__data_start = . ;
     30 	.data :
     31 	{
     32 		*(.data)
     33 	}
     34 
     35 	. = ALIGN(COHERENCY_UNIT);
     36 	.data.cacheline_aligned :
     37 	{
     38 		*(.data.cacheline_aligned)
     39 	}
     40 	. = ALIGN(COHERENCY_UNIT);
     41 	.data.read_mostly :
     42 	{
     43 		*(.data.read_mostly)
     44 	}
     45 	. = ALIGN(COHERENCY_UNIT);
     46 	_edata = . ;
     47 	PROVIDE (edata = .) ;
     48 	__bss_start = . ;
     49 	.bss :
     50 	{
     51 		*(.bss)
     52 		*(.bss.*)
     53 		*(COMMON)
     54 	. = ALIGN(32 / 8);
     55 	}
     56 	. = ALIGN(32 / 8);
     57 	_end = . ;
     58 	PROVIDE (end = .) ;
     59 	.note.netbsd.ident :
     60 	{
     61 		KEEP(*(.note.netbsd.ident));
     62 	}
     63 }
     64 
     65 SECTIONS
     66 {
     67 	.text :
     68 	AT (ADDR(.text) & 0x0fffffff)
     69 	{
     70 		*(.text)
     71 	} = 0
     72 }
     73