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