1 1.6 uebayasi /* $NetBSD: kern.ldscript,v 1.10 2015/08/22 23:51:48 uebayasi Exp $ */ 2 1.1 pk 3 1.1 pk /* 4 1.1 pk * Kernel linker script for NetBSD/sparc. This script is based on 5 1.1 pk * elf32_sparc.xn, but puts _etext after all of the read-only sections. 6 1.1 pk */ 7 1.1 pk 8 1.1 pk OUTPUT_FORMAT("elf32-sparc", "elf32-sparc", 9 1.1 pk "elf32-sparc") 10 1.1 pk OUTPUT_ARCH(sparc) 11 1.1 pk ENTRY(_start) 12 1.1 pk /* Do we need any of these for elf? 13 1.1 pk __DYNAMIC = 0; */ 14 1.1 pk SECTIONS 15 1.1 pk { 16 1.1 pk /* Read-only sections, merged into text segment: */ 17 1.4 martin . = 0x10000 + SIZEOF_HEADERS; 18 1.1 pk .text : 19 1.1 pk { 20 1.1 pk *(.text) 21 1.1 pk *(.stub) 22 1.1 pk /* .gnu.warning sections are handled specially by elf32.em. */ 23 1.1 pk *(.gnu.warning) 24 1.1 pk *(.gnu.linkonce.t*) 25 1.1 pk } =0 26 1.1 pk .rodata : { *(.rodata) *(.gnu.linkonce.r*) } 27 1.1 pk .rodata1 : { *(.rodata1) } 28 1.1 pk _etext = .; 29 1.1 pk PROVIDE (etext = .); 30 1.1 pk /* Adjust the address for the data segment. We want to adjust up to 31 1.1 pk the same address within the page on the next page up. */ 32 1.1 pk . = ALIGN(0x10000) + (. & (0x10000 - 1)); 33 1.2 pk kernel_data_start = .; 34 1.1 pk .data : 35 1.1 pk { 36 1.1 pk *(.data) 37 1.1 pk *(.gnu.linkonce.d*) 38 1.1 pk CONSTRUCTORS 39 1.1 pk } 40 1.1 pk .data1 : { *(.data1) } 41 1.1 pk .plt : { *(.plt) } 42 1.1 pk .got : { *(.got.plt) *(.got) } 43 1.1 pk .dynamic : { *(.dynamic) } 44 1.1 pk /* We want the small data sections together, so single-instruction offsets 45 1.1 pk can access them all, and initialized data all before uninitialized, so 46 1.1 pk we can shorten the on-disk segment size. */ 47 1.1 pk .sdata : { *(.sdata) } 48 1.1 pk _edata = .; 49 1.1 pk PROVIDE (edata = .); 50 1.1 pk __bss_start = .; 51 1.1 pk .sbss : { *(.sbss) *(.scommon) } 52 1.1 pk .bss : 53 1.1 pk { 54 1.6 uebayasi *(.dynbss) 55 1.6 uebayasi *(.bss) 56 1.6 uebayasi *(COMMON) 57 1.1 pk } 58 1.1 pk . = ALIGN(32 / 8); 59 1.1 pk _end = . ; 60 1.1 pk PROVIDE (end = .); 61 1.1 pk /* Stabs debugging sections. */ 62 1.1 pk .stab 0 : { *(.stab) } 63 1.1 pk .stabstr 0 : { *(.stabstr) } 64 1.1 pk .stab.excl 0 : { *(.stab.excl) } 65 1.1 pk .stab.exclstr 0 : { *(.stab.exclstr) } 66 1.1 pk .stab.index 0 : { *(.stab.index) } 67 1.1 pk .stab.indexstr 0 : { *(.stab.indexstr) } 68 1.1 pk .comment 0 : { *(.comment) } 69 1.1 pk /* DWARF debug sections. 70 1.1 pk Symbols in the DWARF debugging sections are relative to the beginning 71 1.1 pk of the section so we begin them at 0. */ 72 1.1 pk /* DWARF 1 */ 73 1.1 pk .debug 0 : { *(.debug) } 74 1.1 pk .line 0 : { *(.line) } 75 1.1 pk /* GNU DWARF 1 extensions */ 76 1.1 pk .debug_srcinfo 0 : { *(.debug_srcinfo) } 77 1.1 pk .debug_sfnames 0 : { *(.debug_sfnames) } 78 1.1 pk /* DWARF 1.1 and DWARF 2 */ 79 1.1 pk .debug_aranges 0 : { *(.debug_aranges) } 80 1.1 pk .debug_pubnames 0 : { *(.debug_pubnames) } 81 1.1 pk /* DWARF 2 */ 82 1.1 pk .debug_info 0 : { *(.debug_info) } 83 1.1 pk .debug_abbrev 0 : { *(.debug_abbrev) } 84 1.1 pk .debug_line 0 : { *(.debug_line) } 85 1.1 pk .debug_frame 0 : { *(.debug_frame) } 86 1.1 pk .debug_str 0 : { *(.debug_str) } 87 1.1 pk .debug_loc 0 : { *(.debug_loc) } 88 1.1 pk .debug_macinfo 0 : { *(.debug_macinfo) } 89 1.1 pk /* SGI/MIPS DWARF 2 extensions */ 90 1.1 pk .debug_weaknames 0 : { *(.debug_weaknames) } 91 1.1 pk .debug_funcnames 0 : { *(.debug_funcnames) } 92 1.1 pk .debug_typenames 0 : { *(.debug_typenames) } 93 1.1 pk .debug_varnames 0 : { *(.debug_varnames) } 94 1.1 pk /* These must appear regardless of . */ 95 1.1 pk } 96