/* $NetBSD: kern.ldscript,v 1.10.48.2 2023/12/29 20:27:31 martin Exp $ */ SECTIONS { KERNEL_BASE_phys = 0x00010000; KERNEL_BASE_virt = 0xf0010000; /* Kernel start: */ .start (KERNEL_BASE_phys) : { *(.start) } /* Read-only sections, merged into text segment: */ .text (KERNEL_BASE_virt + ALIGN(SIZEOF(.start), ALIGNOF(.text))) : AT (LOADADDR(.start) + ALIGN(SIZEOF(.start), ALIGNOF(.text))) { *(.text) *(.text.*) *(.stub) *(.glue_7t) *(.glue_7) } PROVIDE(__rodata_start = .); .rodata : { *(.rodata) *(.rodata.*) . = ALIGN(64); __CTOR_LIST__ = .; *(.ctors) *(.init_array) __CTOR_END__ = .; } PROVIDE (__etext = .); PROVIDE (_etext = .); PROVIDE (etext = .); /* Adjust the address for the data segment to start on the next large page boundary. */ . = ALIGN(0x10000); .data : { __data_start = . ; *(.data) *(.data.*) } .sdata : { *(.sdata) *(.sdata.*) } . = ALIGN(8); _edata = .; PROVIDE (edata = .); __bss_start = .; __bss_start__ = .; .sbss : { PROVIDE (__sbss_start = .); PROVIDE (___sbss_start = .); *(.dynsbss) *(.sbss) *(.sbss.*) *(.scommon) PROVIDE (__sbss_end = .); PROVIDE (___sbss_end = .); } .bss : { *(.dynbss) *(.bss) *(.bss.*) *(COMMON) /* Align here to ensure that the .bss section occupies space up to _end. Align after .bss to ensure correct alignment even if the .bss section disappears because there are no input sections. */ . = ALIGN(32 / 8); } . = ALIGN(32 / 8); _end = .; _bss_end__ = . ; __bss_end__ = . ; __end__ = . ; PROVIDE (end = .); }