1/* $NetBSD: stand.ldscript,v 1.6 2021/04/23 08:42:26 simonb Exp $ */ 2 3/* ldscript for NetBSD/mipsco standalone bootstraps */ 4OUTPUT_FORMAT("elf32-tradbigmips", "elf32-tradbigmips", "elf32-tradlittlemips") 5OUTPUT_ARCH(mips) 6ENTRY(_start) 7SECTIONS 8{ 9 /* Read-only sections, merged into text segment. Assumes the 10 kernel Makefile sets the start address via -Ttext. */ 11 .text : 12 { 13 _ftext = . ; 14 *(.text) 15 *(.text.*) 16 *(.gnu.warning) 17 } =0 18 _etext = .; 19 PROVIDE (etext = .); 20 .rodata : { *(.rodata) } 21 .data : 22 { 23 _fdata = . ; 24 *(.data) 25 CONSTRUCTORS 26 } 27 _gp = ALIGN(16); 28 .lit8 : { *(.lit8) } 29 .lit4 : { *(.lit4) } 30 .sdata : { *(.sdata) } 31 _edata = .; 32 PROVIDE (edata = .); 33 __bss_start = .; 34 _fbss = .; 35 .bss : 36 { 37 *(.bss) 38 *(COMMON) 39 *(.sbss) 40 *(.scommon) 41 } 42 _end = . ; 43 PROVIDE (end = .); 44 45 /* 46 * Depending on the nuber of sections and their relative position 47 * the Mips PROM firmware incorrectly loads the image into memory 48 * 8 bytes higher than expected. If this happens change the following 49 * definition from .reginfo to /DISCARD/ to remove the section 50 */ 51 52 .reginfo : { *(.reginfo) } 53} 54