1 /* $NetBSD: kern.ldscript,v 1.12 2015/08/25 02:58:59 uebayasi Exp $ */ 2 3 #undef sparc 4 5 /* 6 * Kernel linker script for NetBSD/sparc. This script is based on 7 * elf32_sparc.xn, but puts _etext after all of the read-only sections. 8 */ 9 10 OUTPUT_FORMAT("elf32-sparc", "elf32-sparc", 11 "elf32-sparc") 12 OUTPUT_ARCH(sparc) 13 ENTRY(_start) 14 /* Do we need any of these for elf? 15 __DYNAMIC = 0; */ 16 SECTIONS 17 { 18 /* Read-only sections, merged into text segment: */ 19 . = 0x10000 + SIZEOF_HEADERS; 20 .text : 21 { 22 *(.text) 23 *(.stub) 24 /* .gnu.warning sections are handled specially by elf32.em. */ 25 *(.gnu.warning) 26 *(.gnu.linkonce.t*) 27 } =0 28 .rodata : { *(.rodata) *(.gnu.linkonce.r*) } 29 .rodata1 : { *(.rodata1) } 30 _etext = .; 31 PROVIDE (etext = .); 32 /* Adjust the address for the data segment. We want to adjust up to 33 the same address within the page on the next page up. */ 34 . = ALIGN(0x10000) + (. & (0x10000 - 1)); 35 kernel_data_start = .; 36 .data : 37 { 38 *(.data) 39 *(.gnu.linkonce.d*) 40 CONSTRUCTORS 41 } 42 .data1 : { *(.data1) } 43 .plt : { *(.plt) } 44 .got : { *(.got.plt) *(.got) } 45 .dynamic : { *(.dynamic) } 46 /* We want the small data sections together, so single-instruction offsets 47 can access them all, and initialized data all before uninitialized, so 48 we can shorten the on-disk segment size. */ 49 .sdata : { *(.sdata) } 50 _edata = .; 51 PROVIDE (edata = .); 52 __bss_start = .; 53 .sbss : { *(.sbss) *(.scommon) } 54 .bss : 55 { 56 *(.dynbss) 57 *(.bss) 58 *(COMMON) 59 } 60 . = ALIGN(32 / 8); 61 _end = . ; 62 PROVIDE (end = .); 63 } 64