1/* $NetBSD: kern.ldscript,v 1.12 2021/04/23 08:42:25 simonb Exp $ */ 2 3#include "assym.h" 4 5/* ldscript for NetBSD/mips kernels and LKMs */ 6OUTPUT_ARCH(mips) 7ENTRY(_start) 8/* Do we need any of these? 9 __DYNAMIC = 0; */ 10_DYNAMIC_LINK = 0; 11SECTIONS 12{ 13 /* Read-only sections, merged into text segment. Assumes the 14 kernel Makefile sets the start address via -Ttext. */ 15 .text : 16 { 17 _ftext = . ; 18 *(.text) 19 *(.text.*) 20 __stub_start = . ; 21 *(.stub*) 22 __stub_end = . ; 23 *(.gnu.warning) 24 } =0 25 _etext = .; 26 PROVIDE (etext = .); 27 .rodata : { *(.rodata) *(.rodata.*) } 28 .reginfo : { *(.reginfo) } 29/* . = . + 0x1000; */ 30 .data : 31 { 32 _fdata = . ; 33 *(.data) 34 CONSTRUCTORS 35 . = ALIGN(COHERENCY_UNIT); 36 *(.data.cacheline_aligned) 37 . = ALIGN(COHERENCY_UNIT); 38 *(.data.read_mostly) 39 . = ALIGN(COHERENCY_UNIT); 40 } 41 _gp = ALIGN(16) + 0x7ff0; 42 .lit8 : { *(.lit8) } 43 .lit4 : { *(.lit4) } 44 .sdata : { *(.sdata) } 45 _edata = .; 46 PROVIDE (edata = .); 47 __bss_start = .; 48 _fbss = .; 49 .sbss : { *(.sbss) *(.scommon) } 50 .bss : 51 { 52 *(.bss) 53 *(COMMON) 54 } 55 _end = . ; 56 PROVIDE (end = .); 57} 58