kern.ldscript revision 1.2
11.2Smatt/* $NetBSD: kern.ldscript,v 1.2 2011/01/18 01:02:53 matt Exp $ */ 21.2Smatt 31.2Smatt/* ldscript for NetBSD/powerpc kernels and LKMs */ 41.2SmattOUTPUT_ARCH(powerpc) 51.2SmattENTRY(_start) 61.2SmattSEARCH_DIR(/lib); 71.2Smatt/* Do we need any of these? 81.2Smatt __DYNAMIC = 0; */ 91.2Smatt_DYNAMIC_LINK = 0; 101.2SmattSECTIONS 111.2Smatt{ 121.2Smatt /* Read-only sections, merged into text segment. Assumes the 131.2Smatt kernel Makefile sets the start address via -Ttext. */ 141.2Smatt .text : 151.2Smatt { 161.2Smatt _ftext = . ; 171.2Smatt *(.text) 181.2Smatt __stub_start = .; 191.2Smatt *(.stub) 201.2Smatt __stub_end = .; 211.2Smatt *(.gnu.warning) 221.2Smatt } =0 231.2Smatt _etext = .; 241.2Smatt PROVIDE (etext = .); 251.2Smatt .rodata : { *(.rodata) *(.rodata.*) } 261.2Smatt .reginfo : { *(.reginfo) } 271.2Smatt/* . = . + 0x1000; */ 281.2Smatt .data : 291.2Smatt { 301.2Smatt _fdata = . ; 311.2Smatt *(.data) 321.2Smatt CONSTRUCTORS 331.2Smatt } 341.2Smatt _gp = ALIGN(16) + 0x7ff0; 351.2Smatt .lit8 : { *(.lit8) } 361.2Smatt .lit4 : { *(.lit4) } 371.2Smatt .sdata : { *(.sdata) } 381.2Smatt _edata = .; 391.2Smatt PROVIDE (edata = .); 401.2Smatt __bss_start = .; 411.2Smatt _fbss = .; 421.2Smatt .sbss : { *(.sbss) *(.scommon) } 431.2Smatt .bss : 441.2Smatt { 451.2Smatt *(.bss) 461.2Smatt *(COMMON) 471.2Smatt } 481.2Smatt _end = . ; 491.2Smatt PROVIDE (end = .); 501.2Smatt /* These are needed for ELF backends which have not yet been 511.2Smatt converted to the new style linker. */ 521.2Smatt .stab 0 : { *(.stab) } 531.2Smatt .stabstr 0 : { *(.stabstr) } 541.2Smatt /* DWARF debug sections. 551.2Smatt Symbols in the .debug DWARF section are relative to the beginning of the 561.2Smatt section so we begin .debug at 0. It's not clear yet what needs to happen 571.2Smatt for the others. */ 581.2Smatt .debug 0 : { *(.debug) } 591.2Smatt .debug_srcinfo 0 : { *(.debug_srcinfo) } 601.2Smatt .debug_aranges 0 : { *(.debug_aranges) } 611.2Smatt .debug_pubnames 0 : { *(.debug_pubnames) } 621.2Smatt .debug_sfnames 0 : { *(.debug_sfnames) } 631.2Smatt .line 0 : { *(.line) } 641.2Smatt /* These must appear regardless of . */ 651.2Smatt .gptab.sdata : { *(.gptab.data) *(.gptab.sdata) } 661.2Smatt .gptab.sbss : { *(.gptab.bss) *(.gptab.sbss) } 671.2Smatt} 68