Home | History | Annotate | Line # | Download | only in conf
      1  1.1  thorpej /*	$NetBSD: kern.ldscript,v 1.1 2021/05/05 01:35:35 thorpej Exp $	*/
      2  1.1  thorpej 
      3  1.1  thorpej /*
      4  1.1  thorpej  * Linker script for the NetBSD/alpha kernel.
      5  1.1  thorpej  *
      6  1.1  thorpej  * This largely behaves the same as the standard elf64-alpha linker
      7  1.1  thorpej  * script for "ld -N"; the kernel is loaded into K0SEG, so there is
      8  1.1  thorpej  * no reason to page-align the .data segment.
      9  1.1  thorpej  */
     10  1.1  thorpej 
     11  1.1  thorpej #include "assym.h"	/* for COHERENCY_UNIT */
     12  1.1  thorpej 
     13  1.1  thorpej OUTPUT_FORMAT("elf64-alpha", "elf64-alpha",
     14  1.1  thorpej 	      "elf64-alpha")
     15  1.1  thorpej OUTPUT_ARCH(alpha)
     16  1.1  thorpej SECTIONS
     17  1.1  thorpej {
     18  1.1  thorpej 	.text	:
     19  1.1  thorpej 	{
     20  1.1  thorpej 		*(.text)
     21  1.1  thorpej 		*(.text.*)
     22  1.1  thorpej 		*(.stub)
     23  1.1  thorpej 	} =0x47ff041f
     24  1.1  thorpej 	_etext = . ;
     25  1.1  thorpej 	PROVIDE (etext = .);
     26  1.1  thorpej 
     27  1.1  thorpej 	.rodata	:
     28  1.1  thorpej 	{
     29  1.1  thorpej 		*(.rodata .rodata.*)
     30  1.1  thorpej 	}
     31  1.1  thorpej 
     32  1.1  thorpej 	.data	:
     33  1.1  thorpej 	{
     34  1.1  thorpej 		*(.data)
     35  1.1  thorpej 
     36  1.1  thorpej 		. = ALIGN(COHERENCY_UNIT);
     37  1.1  thorpej 		*(.data.cacheline_aligned)
     38  1.1  thorpej 
     39  1.1  thorpej 		. = ALIGN(COHERENCY_UNIT);
     40  1.1  thorpej 		*(.data.read_mostly)
     41  1.1  thorpej 
     42  1.1  thorpej 		. = ALIGN(COHERENCY_UNIT);
     43  1.1  thorpej 		*(.data.*)
     44  1.1  thorpej 	}
     45  1.1  thorpej 
     46  1.1  thorpej 	/*
     47  1.1  thorpej 	 * Small-data located along side GOT and small-bss for
     48  1.1  thorpej 	 * GP-relative addressing.
     49  1.1  thorpej 	 */
     50  1.1  thorpej 
     51  1.1  thorpej 	.got	:
     52  1.1  thorpej 	{
     53  1.1  thorpej 		*(.got)
     54  1.1  thorpej 	}
     55  1.1  thorpej 
     56  1.1  thorpej 	.sdata	:
     57  1.1  thorpej 	{
     58  1.1  thorpej 		*(.sdata .sdata.*)
     59  1.1  thorpej 	}
     60  1.1  thorpej 	_edata = . ;
     61  1.1  thorpej 	PROVIDE (edata = .) ;
     62  1.1  thorpej 
     63  1.1  thorpej 	. = .;
     64  1.1  thorpej 	__bss_start = .;
     65  1.1  thorpej 	.sbss	:
     66  1.1  thorpej 	{
     67  1.1  thorpej 		*(.sbss .sbss.*)
     68  1.1  thorpej 		*(.scommon)
     69  1.1  thorpej 	}
     70  1.1  thorpej 
     71  1.1  thorpej 	.bss	:
     72  1.1  thorpej 	{
     73  1.1  thorpej 		*(.bss .bss.*)
     74  1.1  thorpej 		*(COMMON)
     75  1.1  thorpej 	}
     76  1.1  thorpej 
     77  1.1  thorpej 	/* End of the kernel image */
     78  1.1  thorpej 	__kernel_end = . ;
     79  1.1  thorpej 	_end = . ;
     80  1.1  thorpej 	PROVIDE (end = .) ;
     81  1.1  thorpej 
     82  1.1  thorpej 	.note.netbsd.ident :
     83  1.1  thorpej 	{
     84  1.1  thorpej 		KEEP(*(.note.netbsd.ident));
     85  1.1  thorpej 	}
     86  1.1  thorpej }
     87