1 /* $NetBSD: kern.ldscript.Xen,v 1.12 2016/05/13 05:45:13 maxv Exp $ */ 2 3 #include "assym.h" 4 5 __PAGE_SIZE = 0x1000 ; 6 7 ENTRY(_start) 8 SECTIONS 9 { 10 /* Read-only sections, merged into text segment: */ 11 .text : 12 { 13 *(.text) 14 *(.text.*) 15 *(.stub) 16 *(.rodata) 17 } 18 _etext = . ; 19 PROVIDE (etext = .) ; 20 21 /* 22 * Adjust the address for the data segment. We want to adjust up to 23 * the same address within the page on the next page up. 24 */ 25 . = ALIGN(0x100000) + (. & (0x100000 - 1)); 26 27 __rodata_start = . ; 28 __data_start = . ; 29 .data : 30 { 31 *(.data) 32 } 33 34 . = ALIGN(COHERENCY_UNIT); 35 .data.cacheline_aligned : 36 { 37 *(.data.cacheline_aligned) 38 } 39 . = ALIGN(COHERENCY_UNIT); 40 .data.read_mostly : 41 { 42 *(.data.read_mostly) 43 } 44 . = ALIGN(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 65 SECTIONS 66 { 67 .text : 68 AT (ADDR(.text)) 69 { 70 *(.text) 71 } = 0 72 } 73