11.18Ssimonb/* $NetBSD: kern.ldscript,v 1.18 2021/04/23 08:42:26 simonb Exp $ */ 21.2Smrg 31.17Suebayasi#undef sparc 41.17Suebayasi 51.2Smrg/* 61.2Smrg * Kernel linker script for NetBSD/sparc64. This script is based on 71.2Smrg * elf64_sparc.xn, but puts _etext after all of the read-only sections. 81.2Smrg */ 91.1SmrgOUTPUT_FORMAT("elf64-sparc", "elf64-sparc", 101.1Smrg "elf64-sparc") 111.1SmrgOUTPUT_ARCH(sparc:v9) 121.1SmrgENTRY(_start) 131.1Smrg/* Do we need any of these for elf? 141.1Smrg __DYNAMIC = 0; */ 151.1SmrgSECTIONS 161.1Smrg{ 171.1Smrg /* Read-only sections, merged into text segment: */ 181.6Smartin . = 0x100000 + SIZEOF_HEADERS; 191.1Smrg .text : 201.1Smrg { 211.1Smrg *(.text) 221.18Ssimonb *(.text.*) 231.1Smrg *(.stub) 241.1Smrg /* .gnu.warning sections are handled specially by elf32.em. */ 251.1Smrg *(.gnu.warning) 261.1Smrg *(.gnu.linkonce.t*) 271.1Smrg } =0x01000000 281.1Smrg .rodata : { *(.rodata) *(.gnu.linkonce.r*) } 291.1Smrg .rodata1 : { *(.rodata1) } 301.2Smrg _etext = .; 311.2Smrg PROVIDE (etext = .); 321.9Schs /* Adjust the address for the data segment. We push the data segment 331.9Schs up to the next 4MB boundary so that we can map the text with large 341.9Schs pages. */ 351.9Schs . = ALIGN(0x400000); 361.2Smrg kernel_data_start = .; 371.1Smrg .data : 381.1Smrg { 391.1Smrg *(.data) 401.1Smrg *(.gnu.linkonce.d*) 411.1Smrg CONSTRUCTORS 421.1Smrg } 431.1Smrg .data1 : { *(.data1) } 441.11Smjf . = ALIGN(64); /* COHERENCY_UNIT */ 451.11Smjf .data.cacheline_aligned : { *(.data.cacheline_aligned) } 461.11Smjf . = ALIGN(64); /* COHERENCY_UNIT */ 471.11Smjf .data.read_mostly : { *(.data.read_mostly) } 481.11Smjf . = ALIGN(64); /* COHERENCY_UNIT */ 491.1Smrg .plt : { *(.plt) } 501.1Smrg .got : { *(.got.plt) *(.got) } 511.1Smrg .dynamic : { *(.dynamic) } 521.1Smrg /* We want the small data sections together, so single-instruction offsets 531.1Smrg can access them all, and initialized data all before uninitialized, so 541.1Smrg we can shorten the on-disk segment size. */ 551.1Smrg .sdata : { *(.sdata) } 561.1Smrg _edata = .; 571.1Smrg PROVIDE (edata = .); 581.1Smrg __bss_start = .; 591.1Smrg .sbss : { *(.sbss) *(.scommon) } 601.1Smrg .bss : 611.1Smrg { 621.12Suebayasi *(.dynbss) 631.12Suebayasi *(.bss) 641.12Suebayasi *(COMMON) 651.1Smrg } 661.1Smrg . = ALIGN(64 / 8); 671.1Smrg _end = . ; 681.1Smrg PROVIDE (end = .); 691.8Smartin .note.netbsd.ident : 701.8Smartin { 711.8Smartin KEEP(*(.note.netbsd.ident)); 721.8Smartin } 731.1Smrg} 74