1 1.2 christos /* $NetBSD: kern.ldscript,v 1.2 2007/05/12 20:59:19 christos Exp $ */ 2 1.1 fvdl 3 1.1 fvdl OUTPUT_FORMAT("elf64-x86-64", "elf64-x86-64", 4 1.1 fvdl "elf64-x86-64") 5 1.1 fvdl OUTPUT_ARCH(i386:x86-64) 6 1.1 fvdl ENTRY(_start) 7 1.1 fvdl SECTIONS 8 1.1 fvdl { 9 1.2 christos /* Read-only sections, merged into text segment: */ 10 1.2 christos .text : 11 1.2 christos AT (ADDR(.text)) 12 1.2 christos { 13 1.2 christos *(.text) 14 1.2 christos *(.text.*) 15 1.2 christos *(.stub) 16 1.2 christos *(.rodata) 17 1.2 christos } =0 18 1.2 christos _etext = . ; 19 1.2 christos PROVIDE (etext = .) ; 20 1.2 christos 21 1.2 christos /* Adjust the address for the data segment. We want to adjust up to 22 1.2 christos the same address within the page on the next page up. */ 23 1.2 christos . = ALIGN(0x100000) + (. & (0x100000 - 1)); 24 1.2 christos .data : 25 1.2 christos AT (LOADADDR(.text) + (ADDR(.data) - ADDR(.text))) 26 1.2 christos { 27 1.2 christos *(.data) 28 1.2 christos *(.data.*) 29 1.2 christos } 30 1.2 christos _edata = . ; 31 1.2 christos PROVIDE (edata = .) ; 32 1.2 christos __bss_start = . ; 33 1.2 christos .bss : 34 1.2 christos AT (LOADADDR(.text) + (ADDR(.bss) - ADDR(.text))) 35 1.2 christos { 36 1.2 christos *(.bss) 37 1.2 christos *(.bss.*) 38 1.2 christos *(COMMON) 39 1.2 christos . = ALIGN(64 / 8); 40 1.2 christos } 41 1.2 christos . = ALIGN(64 / 8); 42 1.2 christos _end = . ; 43 1.2 christos PROVIDE (end = .) ; 44 1.2 christos .note.netbsd.ident : 45 1.1 fvdl { 46 1.2 christos KEEP(*(.note.netbsd.ident)); 47 1.1 fvdl } 48 1.1 fvdl } 49