1 1.12 uebayasi /* $NetBSD: kern.ldscript,v 1.12 2015/08/20 07:00:48 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 AT (ADDR(.text) & 0x0fffffff) 12 1.12 uebayasi { 13 1.12 uebayasi *(.text) 14 1.12 uebayasi *(.text.*) 15 1.12 uebayasi *(.stub) 16 1.12 uebayasi } =0 17 1.12 uebayasi _etext = . ; 18 1.12 uebayasi PROVIDE (etext = .) ; 19 1.5 pavel 20 1.12 uebayasi .rodata : 21 1.12 uebayasi AT (LOADADDR(.text) + (ADDR(.rodata) - ADDR(.text))) 22 1.12 uebayasi { 23 1.12 uebayasi *(.rodata) 24 1.12 uebayasi *(.rodata.*) 25 1.12 uebayasi } 26 1.9 chs 27 1.12 uebayasi /* Adjust the address for the data segment. We want to adjust up to 28 1.12 uebayasi the same address within the page on the next page up. */ 29 1.12 uebayasi . = ALIGN(0x1000) + (. & (0x1000 - 1)); 30 1.12 uebayasi __data_start = . ; 31 1.12 uebayasi .data : 32 1.12 uebayasi AT (LOADADDR(.text) + (ADDR(.data) - ADDR(.text))) 33 1.12 uebayasi { 34 1.12 uebayasi *(.data) 35 1.12 uebayasi } 36 1.12 uebayasi . = ALIGN(64); /* COHERENCY_UNIT */ 37 1.12 uebayasi .data.cacheline_aligned : 38 1.12 uebayasi AT (LOADADDR(.text) + (ADDR(.data.cacheline_aligned) - ADDR(.text))) 39 1.12 uebayasi { 40 1.12 uebayasi *(.data.cacheline_aligned) 41 1.12 uebayasi } 42 1.12 uebayasi . = ALIGN(64); /* COHERENCY_UNIT */ 43 1.12 uebayasi .data.read_mostly : 44 1.12 uebayasi AT (LOADADDR(.text) + (ADDR(.data.read_mostly) - ADDR(.text))) 45 1.12 uebayasi { 46 1.12 uebayasi *(.data.read_mostly) 47 1.12 uebayasi } 48 1.12 uebayasi . = ALIGN(64); /* COHERENCY_UNIT */ 49 1.12 uebayasi _edata = . ; 50 1.12 uebayasi PROVIDE (edata = .) ; 51 1.12 uebayasi __bss_start = . ; 52 1.12 uebayasi .bss : 53 1.12 uebayasi AT (LOADADDR(.text) + (ADDR(.bss) - ADDR(.text))) 54 1.12 uebayasi { 55 1.12 uebayasi *(.bss) 56 1.12 uebayasi *(.bss.*) 57 1.12 uebayasi *(COMMON) 58 1.12 uebayasi . = ALIGN(32 / 8); 59 1.12 uebayasi } 60 1.12 uebayasi . = ALIGN(32 / 8); 61 1.1 thorpej _end = . ; 62 1.5 pavel PROVIDE (end = .) ; 63 1.6 christos .note.netbsd.ident : 64 1.6 christos { 65 1.6 christos KEEP(*(.note.netbsd.ident)); 66 1.6 christos } 67 1.1 thorpej } 68