/* $NetBSD: kern.ldscript.2MB,v 1.3 2010/06/01 22:13:30 mjf Exp $ */ OUTPUT_FORMAT("elf64-x86-64", "elf64-x86-64", "elf64-x86-64") OUTPUT_ARCH(i386:x86-64) ENTRY(_start) SECTIONS { /* Read-only sections, merged into text segment: */ .text : AT (ADDR(.text)) { *(.text) *(.text.*) *(.stub) } =0 _etext = . ; PROVIDE (etext = .) ; .rodata : AT (LOADADDR(.text) + (ADDR(.rodata) - ADDR(.text))) { *(.rodata) *(.rodata.*) } /* Adjust the address for the data segment. We push the data segment up to the next 2MB boundary so that we can map the text with large pages. */ . = ALIGN(0x200000); __data_start = . ; .data : AT (LOADADDR(.text) + (ADDR(.data) - ADDR(.text))) { *(.data) } . = ALIGN(64); /* COHERENCY_UNIT */ .data.cacheline_aligned : AT (LOADADDR(.text) + (ADDR(.data.cacheline_aligned) - ADDR(.text))) { *(.data.cacheline_aligned) } . = ALIGN(64); /* COHERENCY_UNIT */ .data.read_mostly : AT (LOADADDR(.text) + (ADDR(.data.read_mostly) - ADDR(.text))) { *(.data.read_mostly) } . = ALIGN(64); /* COHERENCY_UNIT */ _edata = . ; PROVIDE (edata = .) ; __bss_start = . ; .bss : AT (LOADADDR(.text) + (ADDR(.bss) - ADDR(.text))) { *(.bss) *(.bss.*) *(COMMON) . = ALIGN(64 / 8); } . = ALIGN(64 / 8); _end = . ; PROVIDE (end = .) ; .note.netbsd.ident : { KEEP(*(.note.netbsd.ident)); } }