1 /* $NetBSD: kern.ldscript,v 1.17 2016/05/12 06:45:16 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 /* 19 * Adjust the address for the rodata segment. We want to adjust up to 20 * the same address within the page on the next page up. 21 */ 22 . = ALIGN(0x1000) + (. & (0x1000 - 1)); 23 24 __rodata_start = . ; 25 .rodata : 26 { 27 *(.rodata) 28 *(.rodata.*) 29 } 30 31 __data_start = . ; 32 .data : 33 { 34 *(.data) 35 } 36 37 . = ALIGN(COHERENCY_UNIT); 38 .data.cacheline_aligned : 39 { 40 *(.data.cacheline_aligned) 41 } 42 . = ALIGN(COHERENCY_UNIT); 43 .data.read_mostly : 44 { 45 *(.data.read_mostly) 46 } 47 . = ALIGN(COHERENCY_UNIT); 48 _edata = . ; 49 PROVIDE (edata = .) ; 50 __bss_start = . ; 51 .bss : 52 { 53 *(.bss) 54 *(.bss.*) 55 *(COMMON) 56 . = ALIGN(32 / 8); 57 } 58 . = ALIGN(32 / 8); 59 _end = . ; 60 PROVIDE (end = .) ; 61 .note.netbsd.ident : 62 { 63 KEEP(*(.note.netbsd.ident)); 64 } 65 } 66 67 SECTIONS 68 { 69 .text : 70 AT (ADDR(.text) & 0x0fffffff) 71 { 72 *(.text) 73 } = 0 74 } 75