1 1.12 uebayasi /* $NetBSD: kern.ldscript,v 1.13 2015/08/20 09:34:54 uebayasi Exp $ */ 2 1.1 thorpej 3 1.1 thorpej OUTPUT_FORMAT("elf32-i386", "elf32-i386", 4 1.1 thorpej "elf32-i386") 5 1.1 thorpej OUTPUT_ARCH(i386) 6 1.1 thorpej ENTRY(_start) 7 1.1 thorpej SECTIONS 8 1.1 thorpej { 9 1.12 uebayasi /* Read-only sections, merged into text segment: */ 10 1.12 uebayasi .text : 11 1.12 uebayasi { 12 1.12 uebayasi *(.text) 13 1.12 uebayasi *(.text.*) 14 1.12 uebayasi *(.stub) 15 1.13 uebayasi } 16 1.12 uebayasi _etext = . ; 17 1.12 uebayasi PROVIDE (etext = .) ; 18 1.5 pavel 19 1.12 uebayasi .rodata : 20 1.12 uebayasi { 21 1.12 uebayasi *(.rodata) 22 1.12 uebayasi *(.rodata.*) 23 1.12 uebayasi } 24 1.9 chs 25 1.12 uebayasi /* Adjust the address for the data segment. We want to adjust up to 26 1.12 uebayasi the same address within the page on the next page up. */ 27 1.12 uebayasi . = ALIGN(0x1000) + (. & (0x1000 - 1)); 28 1.12 uebayasi __data_start = . ; 29 1.12 uebayasi .data : 30 1.12 uebayasi { 31 1.12 uebayasi *(.data) 32 1.12 uebayasi } 33 1.12 uebayasi . = ALIGN(64); /* COHERENCY_UNIT */ 34 1.12 uebayasi .data.cacheline_aligned : 35 1.12 uebayasi { 36 1.12 uebayasi *(.data.cacheline_aligned) 37 1.12 uebayasi } 38 1.12 uebayasi . = ALIGN(64); /* COHERENCY_UNIT */ 39 1.12 uebayasi .data.read_mostly : 40 1.12 uebayasi { 41 1.12 uebayasi *(.data.read_mostly) 42 1.12 uebayasi } 43 1.12 uebayasi . = ALIGN(64); /* COHERENCY_UNIT */ 44 1.12 uebayasi _edata = . ; 45 1.12 uebayasi PROVIDE (edata = .) ; 46 1.12 uebayasi __bss_start = . ; 47 1.12 uebayasi .bss : 48 1.12 uebayasi { 49 1.12 uebayasi *(.bss) 50 1.12 uebayasi *(.bss.*) 51 1.12 uebayasi *(COMMON) 52 1.12 uebayasi . = ALIGN(32 / 8); 53 1.12 uebayasi } 54 1.12 uebayasi . = ALIGN(32 / 8); 55 1.1 thorpej _end = . ; 56 1.5 pavel PROVIDE (end = .) ; 57 1.6 christos .note.netbsd.ident : 58 1.6 christos { 59 1.6 christos KEEP(*(.note.netbsd.ident)); 60 1.6 christos } 61 1.1 thorpej } 62 1.13 uebayasi SECTIONS 63 1.13 uebayasi { 64 1.13 uebayasi .text : 65 1.13 uebayasi AT (ADDR(.text) & 0x0fffffff) 66 1.13 uebayasi { 67 1.13 uebayasi *(.text) 68 1.13 uebayasi } =0 69 1.13 uebayasi } 70