1 1.4.2.2 thorpej /* $NetBSD: kern.ldscript,v 1.4.2.2 2002/05/16 01:01:42 thorpej Exp $ */ 2 1.4.2.2 thorpej 3 1.4.2.2 thorpej /* 4 1.4.2.2 thorpej * Kernel linker script for NetBSD/sparc64. This script is based on 5 1.4.2.2 thorpej * elf64_sparc.xn, but puts _etext after all of the read-only sections. 6 1.4.2.2 thorpej */ 7 1.4.2.2 thorpej OUTPUT_FORMAT("elf64-sparc", "elf64-sparc", 8 1.4.2.2 thorpej "elf64-sparc") 9 1.4.2.2 thorpej OUTPUT_ARCH(sparc:v9) 10 1.4.2.2 thorpej ENTRY(_start) 11 1.4.2.2 thorpej SEARCH_DIR(/usr/lib); 12 1.4.2.2 thorpej /* Do we need any of these for elf? 13 1.4.2.2 thorpej __DYNAMIC = 0; */ 14 1.4.2.2 thorpej SECTIONS 15 1.4.2.2 thorpej { 16 1.4.2.2 thorpej /* Read-only sections, merged into text segment: */ 17 1.4.2.2 thorpej . = 0x100000 + SIZEOF_HEADERS; 18 1.4.2.2 thorpej .interp : { *(.interp) } 19 1.4.2.2 thorpej .hash : { *(.hash) } 20 1.4.2.2 thorpej .dynsym : { *(.dynsym) } 21 1.4.2.2 thorpej .dynstr : { *(.dynstr) } 22 1.4.2.2 thorpej .gnu.version : { *(.gnu.version) } 23 1.4.2.2 thorpej .gnu.version_d : { *(.gnu.version_d) } 24 1.4.2.2 thorpej .gnu.version_r : { *(.gnu.version_r) } 25 1.4.2.2 thorpej .rel.text : 26 1.4.2.2 thorpej { *(.rel.text) *(.rel.gnu.linkonce.t*) } 27 1.4.2.2 thorpej .rela.text : 28 1.4.2.2 thorpej { *(.rela.text) *(.rela.gnu.linkonce.t*) } 29 1.4.2.2 thorpej .rel.data : 30 1.4.2.2 thorpej { *(.rel.data) *(.rel.gnu.linkonce.d*) } 31 1.4.2.2 thorpej .rela.data : 32 1.4.2.2 thorpej { *(.rela.data) *(.rela.gnu.linkonce.d*) } 33 1.4.2.2 thorpej .rel.rodata : 34 1.4.2.2 thorpej { *(.rel.rodata) *(.rel.gnu.linkonce.r*) } 35 1.4.2.2 thorpej .rela.rodata : 36 1.4.2.2 thorpej { *(.rela.rodata) *(.rela.gnu.linkonce.r*) } 37 1.4.2.2 thorpej .rel.got : { *(.rel.got) } 38 1.4.2.2 thorpej .rela.got : { *(.rela.got) } 39 1.4.2.2 thorpej .rel.ctors : { *(.rel.ctors) } 40 1.4.2.2 thorpej .rela.ctors : { *(.rela.ctors) } 41 1.4.2.2 thorpej .rel.dtors : { *(.rel.dtors) } 42 1.4.2.2 thorpej .rela.dtors : { *(.rela.dtors) } 43 1.4.2.2 thorpej .rel.init : { *(.rel.init) } 44 1.4.2.2 thorpej .rela.init : { *(.rela.init) } 45 1.4.2.2 thorpej .rel.fini : { *(.rel.fini) } 46 1.4.2.2 thorpej .rela.fini : { *(.rela.fini) } 47 1.4.2.2 thorpej .rel.bss : { *(.rel.bss) } 48 1.4.2.2 thorpej .rela.bss : { *(.rela.bss) } 49 1.4.2.2 thorpej .rel.plt : { *(.rel.plt) } 50 1.4.2.2 thorpej .rela.plt : { *(.rela.plt) } 51 1.4.2.2 thorpej .init : { *(.init) } =0x01000000 52 1.4.2.2 thorpej .text : 53 1.4.2.2 thorpej { 54 1.4.2.2 thorpej *(.text) 55 1.4.2.2 thorpej *(.stub) 56 1.4.2.2 thorpej /* .gnu.warning sections are handled specially by elf32.em. */ 57 1.4.2.2 thorpej *(.gnu.warning) 58 1.4.2.2 thorpej *(.gnu.linkonce.t*) 59 1.4.2.2 thorpej } =0x01000000 60 1.4.2.2 thorpej .fini : { *(.fini) } =0x01000000 61 1.4.2.2 thorpej .rodata : { *(.rodata) *(.gnu.linkonce.r*) } 62 1.4.2.2 thorpej .rodata1 : { *(.rodata1) } 63 1.4.2.2 thorpej _etext = .; 64 1.4.2.2 thorpej PROVIDE (etext = .); 65 1.4.2.2 thorpej /* Adjust the address for the data segment. We want to adjust up to 66 1.4.2.2 thorpej the same address within the page on the next page up. */ 67 1.4.2.2 thorpej . = ALIGN(0x100000) + (. & (0x100000 - 1)); 68 1.4.2.2 thorpej kernel_data_start = .; 69 1.4.2.2 thorpej .data : 70 1.4.2.2 thorpej { 71 1.4.2.2 thorpej *(.data) 72 1.4.2.2 thorpej *(.gnu.linkonce.d*) 73 1.4.2.2 thorpej CONSTRUCTORS 74 1.4.2.2 thorpej } 75 1.4.2.2 thorpej .data1 : { *(.data1) } 76 1.4.2.2 thorpej .ctors : 77 1.4.2.2 thorpej { 78 1.4.2.2 thorpej *(.ctors) 79 1.4.2.2 thorpej } 80 1.4.2.2 thorpej .dtors : 81 1.4.2.2 thorpej { 82 1.4.2.2 thorpej *(.dtors) 83 1.4.2.2 thorpej } 84 1.4.2.2 thorpej .plt : { *(.plt) } 85 1.4.2.2 thorpej .got : { *(.got.plt) *(.got) } 86 1.4.2.2 thorpej .dynamic : { *(.dynamic) } 87 1.4.2.2 thorpej /* We want the small data sections together, so single-instruction offsets 88 1.4.2.2 thorpej can access them all, and initialized data all before uninitialized, so 89 1.4.2.2 thorpej we can shorten the on-disk segment size. */ 90 1.4.2.2 thorpej .sdata : { *(.sdata) } 91 1.4.2.2 thorpej _edata = .; 92 1.4.2.2 thorpej PROVIDE (edata = .); 93 1.4.2.2 thorpej __bss_start = .; 94 1.4.2.2 thorpej .sbss : { *(.sbss) *(.scommon) } 95 1.4.2.2 thorpej .bss : 96 1.4.2.2 thorpej { 97 1.4.2.2 thorpej *(.dynbss) 98 1.4.2.2 thorpej *(.bss) 99 1.4.2.2 thorpej *(COMMON) 100 1.4.2.2 thorpej } 101 1.4.2.2 thorpej . = ALIGN(64 / 8); 102 1.4.2.2 thorpej _end = . ; 103 1.4.2.2 thorpej PROVIDE (end = .); 104 1.4.2.2 thorpej /* Stabs debugging sections. */ 105 1.4.2.2 thorpej .stab 0 : { *(.stab) } 106 1.4.2.2 thorpej .stabstr 0 : { *(.stabstr) } 107 1.4.2.2 thorpej .stab.excl 0 : { *(.stab.excl) } 108 1.4.2.2 thorpej .stab.exclstr 0 : { *(.stab.exclstr) } 109 1.4.2.2 thorpej .stab.index 0 : { *(.stab.index) } 110 1.4.2.2 thorpej .stab.indexstr 0 : { *(.stab.indexstr) } 111 1.4.2.2 thorpej .comment 0 : { *(.comment) } 112 1.4.2.2 thorpej /* DWARF debug sections. 113 1.4.2.2 thorpej Symbols in the DWARF debugging sections are relative to the beginning 114 1.4.2.2 thorpej of the section so we begin them at 0. */ 115 1.4.2.2 thorpej /* DWARF 1 */ 116 1.4.2.2 thorpej .debug 0 : { *(.debug) } 117 1.4.2.2 thorpej .line 0 : { *(.line) } 118 1.4.2.2 thorpej /* GNU DWARF 1 extensions */ 119 1.4.2.2 thorpej .debug_srcinfo 0 : { *(.debug_srcinfo) } 120 1.4.2.2 thorpej .debug_sfnames 0 : { *(.debug_sfnames) } 121 1.4.2.2 thorpej /* DWARF 1.1 and DWARF 2 */ 122 1.4.2.2 thorpej .debug_aranges 0 : { *(.debug_aranges) } 123 1.4.2.2 thorpej .debug_pubnames 0 : { *(.debug_pubnames) } 124 1.4.2.2 thorpej /* DWARF 2 */ 125 1.4.2.2 thorpej .debug_info 0 : { *(.debug_info) } 126 1.4.2.2 thorpej .debug_abbrev 0 : { *(.debug_abbrev) } 127 1.4.2.2 thorpej .debug_line 0 : { *(.debug_line) } 128 1.4.2.2 thorpej .debug_frame 0 : { *(.debug_frame) } 129 1.4.2.2 thorpej .debug_str 0 : { *(.debug_str) } 130 1.4.2.2 thorpej .debug_loc 0 : { *(.debug_loc) } 131 1.4.2.2 thorpej .debug_macinfo 0 : { *(.debug_macinfo) } 132 1.4.2.2 thorpej /* SGI/MIPS DWARF 2 extensions */ 133 1.4.2.2 thorpej .debug_weaknames 0 : { *(.debug_weaknames) } 134 1.4.2.2 thorpej .debug_funcnames 0 : { *(.debug_funcnames) } 135 1.4.2.2 thorpej .debug_typenames 0 : { *(.debug_typenames) } 136 1.4.2.2 thorpej .debug_varnames 0 : { *(.debug_varnames) } 137 1.4.2.2 thorpej /* These must appear regardless of . */ 138 1.4.2.2 thorpej } 139