1 1.16 uebayasi #undef sparc 2 1.16 uebayasi 3 1.1 mrg /* 4 1.1 mrg * Kernel linker script for NetBSD/sparc. This script is based on 5 1.1 mrg * elf32_sparc.xn, but puts _etext after all of the read-only sections. 6 1.1 mrg */ 7 1.1 mrg 8 1.1 mrg OUTPUT_FORMAT("elf32-sparc", "elf32-sparc", 9 1.1 mrg "elf32-sparc") 10 1.1 mrg OUTPUT_ARCH(sparc) 11 1.1 mrg ENTRY(_start) 12 1.1 mrg /* Do we need any of these for elf? 13 1.1 mrg __DYNAMIC = 0; */ 14 1.1 mrg SECTIONS 15 1.1 mrg { 16 1.1 mrg /* Read-only sections, merged into text segment: */ 17 1.5 martin . = 0x10000 + SIZEOF_HEADERS; 18 1.1 mrg .text : 19 1.1 mrg { 20 1.1 mrg *(.text) 21 1.18 simonb *(.text.*) 22 1.1 mrg *(.stub) 23 1.1 mrg /* .gnu.warning sections are handled specially by elf32.em. */ 24 1.1 mrg *(.gnu.warning) 25 1.1 mrg *(.gnu.linkonce.t*) 26 1.1 mrg } =0 27 1.1 mrg .rodata : { *(.rodata) *(.gnu.linkonce.r*) } 28 1.1 mrg .rodata1 : { *(.rodata1) } 29 1.1 mrg _etext = .; 30 1.1 mrg PROVIDE (etext = .); 31 1.8 chs /* Adjust the address for the data segment. We push the data segment 32 1.8 chs up to the next 4MB boundary so that we can map the text with large 33 1.8 chs pages. */ 34 1.8 chs . = ALIGN(0x400000); 35 1.1 mrg kernel_data_start = .; 36 1.1 mrg .data : 37 1.1 mrg { 38 1.1 mrg *(.data) 39 1.1 mrg *(.gnu.linkonce.d*) 40 1.1 mrg CONSTRUCTORS 41 1.1 mrg } 42 1.1 mrg .data1 : { *(.data1) } 43 1.10 mjf . = ALIGN(64); /* COHERENCY_UNIT */ 44 1.17 nakayama .data.cacheline_aligned : { *(.data.cacheline_aligned) } 45 1.10 mjf . = ALIGN(64); /* COHERENCY_UNIT */ 46 1.10 mjf .data.read_mostly : { *(.data.read_mostly) } 47 1.10 mjf . = ALIGN(64); /* COHERENCY_UNIT */ 48 1.1 mrg .plt : { *(.plt) } 49 1.1 mrg .got : { *(.got.plt) *(.got) } 50 1.1 mrg .dynamic : { *(.dynamic) } 51 1.1 mrg /* We want the small data sections together, so single-instruction offsets 52 1.1 mrg can access them all, and initialized data all before uninitialized, so 53 1.1 mrg we can shorten the on-disk segment size. */ 54 1.1 mrg .sdata : { *(.sdata) } 55 1.1 mrg _edata = .; 56 1.1 mrg PROVIDE (edata = .); 57 1.1 mrg __bss_start = .; 58 1.1 mrg .sbss : { *(.sbss) *(.scommon) } 59 1.1 mrg .bss : 60 1.1 mrg { 61 1.11 uebayasi *(.dynbss) 62 1.11 uebayasi *(.bss) 63 1.11 uebayasi *(COMMON) 64 1.1 mrg } 65 1.1 mrg . = ALIGN(32 / 8); 66 1.1 mrg _end = . ; 67 1.1 mrg PROVIDE (end = .); 68 1.7 martin .note.netbsd.ident : 69 1.7 martin { 70 1.7 martin KEEP(*(.note.netbsd.ident)); 71 1.7 martin } 72 1.1 mrg } 73