/* $NetBSD: kern.ldscript,v 1.5 2006/08/27 04:48:44 tsutsui Exp $ */ /* ldscript for NetBSD/tsarmips kernels */ /* the VMA is not the same as the LMA */ OUTPUT_ARCH(mips) ENTRY(_start) SEARCH_DIR(/lib); /* Do we need any of these? __DYNAMIC = 0; _DYNAMIC_LINK = 0; */ SECTIONS { /* Read-only sections, merged into text segment. Assumes the kernel Makefile sets the start address via -Ttext. */ .text : { *(.text) *(.text.*) PROVIDE(__stub_start = .); *(.stub*) PROVIDE(__stub_end = .); *(.gnu.warning) } PROVIDE (etext = .); .rodata : { *(.rodata) *(.rodata.*) } .reginfo : { *(.reginfo) } /* Align the address for the data segment to next 2MB boundary so text can be mapped with large pages */ . = ALIGN(0x200000); PROVIDE (data_start = .); .data : { *(.data) CONSTRUCTORS } PROVIDE (_gp = ALIGN(16) + 0x7ff0); .lit8 : { *(.lit8) } .lit4 : { *(.lit4) } .sdata : { *(.sdata) } PROVIDE (edata = .); .sbss : { *(.sbss) *(.scommon) } .bss : { *(.bss) *(.bss.*) *(COMMON) } PROVIDE (end = .); /* These are needed for ELF backends which have not yet been converted to the new style linker. */ .stab 0 : { *(.stab) } .stabstr 0 : { *(.stabstr) } /* DWARF debug sections. Symbols in the .debug DWARF section are relative to the beginning of the section so we begin .debug at 0. It's not clear yet what needs to happen for the others. */ .debug 0 : { *(.debug) } .debug_srcinfo 0 : { *(.debug_srcinfo) } .debug_aranges 0 : { *(.debug_aranges) } .debug_pubnames 0 : { *(.debug_pubnames) } .debug_sfnames 0 : { *(.debug_sfnames) } .line 0 : { *(.line) } /* These must appear regardless of . */ .gptab.sdata : { *(.gptab.data) *(.gptab.sdata) } .gptab.sbss : { *(.gptab.bss) *(.gptab.sbss) } } SECTIONS { .text : AT (ADDR(.text) & 0x0fffffff) { *(.text) } = 0 }