/* $NetBSD: kern.ldscript,v 1.18 2016/05/13 10:18:01 maxv Exp $ */ #include "assym.h" __PAGE_SIZE = 0x1000 ; ENTRY(_start) SECTIONS { .text : { *(.text) *(.text.*) *(.stub) } _etext = . ; PROVIDE (etext = .) ; /* * Adjust the address for the rodata segment. We want to adjust up to * the same address within the page on the next page up. */ . = ALIGN(0x1000) + (. & (0x1000 - 1)); __rodata_start = . ; .rodata : { *(.rodata) *(.rodata.*) } __data_start = . ; .data : { *(.data) } . = ALIGN(COHERENCY_UNIT); .data.cacheline_aligned : { *(.data.cacheline_aligned) } . = ALIGN(COHERENCY_UNIT); .data.read_mostly : { *(.data.read_mostly) } . = ALIGN(COHERENCY_UNIT); _edata = . ; PROVIDE (edata = .) ; __bss_start = . ; .bss : { *(.bss) *(.bss.*) *(COMMON) . = ALIGN(32 / 8); } . = ALIGN(__PAGE_SIZE); /* End of the kernel image */ __kernel_end = . ; _end = . ; PROVIDE (end = .) ; .note.netbsd.ident : { KEEP(*(.note.netbsd.ident)); } } SECTIONS { .text : AT (ADDR(.text) & 0x0fffffff) { *(.text) } = 0 }