1/* $NetBSD: kern.ldscript,v 1.1 2018/05/18 19:04:10 reinoud Exp $ */ 2 3#include "assym.h" 4 5ENTRY(_start) 6SECTIONS 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(0x100000) + (. & (0x100000 - 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 47 _edata = . ; 48 PROVIDE (edata = .) ; 49 __bss_start = . ; 50 .bss : 51 { 52 *(.bss) 53 *(.bss.*) 54 *(COMMON) 55 . = ALIGN(64 / 8); 56 } 57 . = ALIGN(64 / 8); 58 _end = . ; 59 PROVIDE (end = .) ; 60 .note.netbsd.ident : 61 { 62 KEEP(*(.note.netbsd.ident)); 63 } 64} 65 66SECTIONS 67{ 68 .text : 69 AT (ADDR(.text) & 0x0fffffff) 70 { 71 *(.text) 72 } = 0 73} 74