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