/* $NetBSD: kern.ldscript,v 1.8 2021/05/01 07:13:21 skrll Exp $ */ #include "assym.h" OUTPUT_ARCH(riscv) ENTRY(start) __PAGE_SIZE = 0x1000 ; __LARGE_PAGE_SIZE = 0x200000 ; SECTIONS { .text : AT (KERNEL_PHYS) { PROVIDE(__kernel_text = .); *(.text) *(.text.*) *(.stub) } _etext = . ; PROVIDE (etext = .); . = ALIGN(__LARGE_PAGE_SIZE); PROVIDE(__rodata_start = .); .rodata : { *(.rodata) *(.rodata.*) *(.srodata) *(.srodata.*) } PROVIDE(_etext = .); PROVIDE(etext = .); . = ALIGN(__LARGE_PAGE_SIZE); .data : { PROVIDE(__data_start = .); *(.data) } . = ALIGN(COHERENCY_UNIT); .data.cacheline_aligned : { *(.data.cacheline_aligned) } . = ALIGN(COHERENCY_UNIT); .data.read_mostly : { *(.data.read_mostly) } . = ALIGN(COHERENCY_UNIT); .sdata : { __global_pointer$ = . + 0x800; *(.sdata) *(.sdata.*) } _edata = .; PROVIDE (edata = .); __bss_start = .; .bss : { *(.bss) *(.bss.*) *(.sbss) *(.sbss.*) *(COMMON) . = ALIGN(__LARGE_PAGE_SIZE); } _bss_end__ = . ; __bss_end__ = . ; . = ALIGN(__PAGE_SIZE); __end__ = . ; _end = .; PROVIDE(end = .); .note.netbsd.ident : { KEEP(*(.note.netbsd.ident)); } } |