1/* $NetBSD: kern.ldscript.2MB,v 1.2 2007/10/18 15:28:33 yamt Exp $ */ 2 3OUTPUT_FORMAT("elf64-x86-64", "elf64-x86-64", 4 "elf64-x86-64") 5OUTPUT_ARCH(i386:x86-64) 6ENTRY(_start) 7SECTIONS 8{ 9 /* Read-only sections, merged into text segment: */ 10 .text : 11 AT (ADDR(.text)) 12 { 13 *(.text) 14 *(.text.*) 15 *(.stub) 16 } =0 17 _etext = . ; 18 PROVIDE (etext = .) ; 19 20 .rodata : 21 AT (LOADADDR(.text) + (ADDR(.rodata) - ADDR(.text))) 22 { 23 *(.rodata) 24 *(.rodata.*) 25 } 26 27 /* Adjust the address for the data segment. We push the data segment 28 up to the next 2MB boundary so that we can map the text with large 29 pages. */ 30 . = ALIGN(0x200000); 31 __data_start = . ; 32 .data : 33 AT (LOADADDR(.text) + (ADDR(.data) - ADDR(.text))) 34 { 35 *(.data) 36 } 37 . = ALIGN(64); /* COHERENCY_UNIT */ 38 .data.cacheline_aligned : 39 AT (LOADADDR(.text) + (ADDR(.data.cacheline_aligned) - ADDR(.text))) 40 { 41 *(.data.cacheline_aligned) 42 } 43 . = ALIGN(64); /* COHERENCY_UNIT */ 44 .data.read_mostly : 45 AT (LOADADDR(.text) + (ADDR(.data.read_mostly) - ADDR(.text))) 46 { 47 *(.data.read_mostly) 48 } 49 . = ALIGN(64); /* COHERENCY_UNIT */ 50 _edata = . ; 51 PROVIDE (edata = .) ; 52 __bss_start = . ; 53 .bss : 54 AT (LOADADDR(.text) + (ADDR(.bss) - ADDR(.text))) 55 { 56 *(.bss) 57 *(.bss.*) 58 *(COMMON) 59 . = ALIGN(64 / 8); 60 } 61 . = ALIGN(64 / 8); 62 _end = . ; 63 PROVIDE (end = .) ; 64 .note.netbsd.ident : 65 { 66 KEEP(*(.note.netbsd.ident)); 67 } 68} 69