1 1.2 uebayasi /* $NetBSD: kern-mb.ldscript,v 1.2 2015/08/20 07:00:49 uebayasi Exp $ */ 2 1.1 matt 3 1.1 matt /* ldscript for NetBSD/powerpc kernels and LKMs */ 4 1.1 matt OUTPUT_ARCH(powerpc) 5 1.1 matt ENTRY(_start) 6 1.1 matt SEARCH_DIR(/lib); 7 1.1 matt /* Do we need any of these? 8 1.1 matt __DYNAMIC = 0; */ 9 1.1 matt _DYNAMIC_LINK = 0; 10 1.1 matt SECTIONS 11 1.1 matt { 12 1.1 matt /* Read-only sections, merged into text segment. Assumes the 13 1.1 matt kernel Makefile sets the start address via -Ttext. */ 14 1.1 matt .text : 15 1.1 matt { 16 1.1 matt _ftext = . ; 17 1.1 matt *(.text) 18 1.1 matt __stub_start = .; 19 1.1 matt *(.stub) 20 1.1 matt __stub_end = .; 21 1.1 matt __stub_pmap_start = .; 22 1.1 matt *(.stub.pmap) 23 1.1 matt __stub_pmap_end = .; 24 1.1 matt *(.gnu.warning) 25 1.1 matt } =0 26 1.1 matt _etext = .; 27 1.1 matt PROVIDE (etext = .); 28 1.1 matt .rodata : { *(.rodata) *(.rodata.*) } 29 1.1 matt .reginfo : { *(.reginfo) } 30 1.1 matt . = ALIGN(0x100000); 31 1.1 matt .data : 32 1.1 matt { 33 1.1 matt _fdata = . ; 34 1.1 matt *(.data) 35 1.1 matt CONSTRUCTORS 36 1.1 matt } 37 1.1 matt .data1 : { *(.data1) } 38 1.1 matt . = ALIGN(32); /* COHERENCY UNIT */ 39 1.1 matt .data.cacheline_aligned : { *(.data.cacheline_aligned) } 40 1.1 matt . = ALIGN(32); /* COHERENCY UNIT */ 41 1.1 matt .data.read_mostly : { *(.data.read_mostly) } 42 1.1 matt . = ALIGN(32); /* COHERENCY UNIT */ 43 1.1 matt _gp = ALIGN(16) + 0x7ff0; 44 1.1 matt .lit8 : { *(.lit8) } 45 1.1 matt .lit4 : { *(.lit4) } 46 1.1 matt .sdata : { *(.sdata) } 47 1.1 matt _edata = .; 48 1.1 matt PROVIDE (edata = .); 49 1.1 matt __bss_start = .; 50 1.1 matt _fbss = .; 51 1.1 matt .sbss : { *(.sbss) *(.scommon) } 52 1.1 matt .bss : 53 1.1 matt { 54 1.2 uebayasi *(.bss) 55 1.2 uebayasi *(COMMON) 56 1.1 matt } 57 1.1 matt _end = . ; 58 1.1 matt PROVIDE (end = .); 59 1.1 matt /* These are needed for ELF backends which have not yet been 60 1.1 matt converted to the new style linker. */ 61 1.1 matt .stab 0 : { *(.stab) } 62 1.1 matt .stabstr 0 : { *(.stabstr) } 63 1.1 matt /* DWARF debug sections. 64 1.1 matt Symbols in the .debug DWARF section are relative to the beginning of the 65 1.1 matt section so we begin .debug at 0. It's not clear yet what needs to happen 66 1.1 matt for the others. */ 67 1.1 matt .debug 0 : { *(.debug) } 68 1.1 matt .debug_srcinfo 0 : { *(.debug_srcinfo) } 69 1.1 matt .debug_aranges 0 : { *(.debug_aranges) } 70 1.1 matt .debug_pubnames 0 : { *(.debug_pubnames) } 71 1.1 matt .debug_sfnames 0 : { *(.debug_sfnames) } 72 1.1 matt .line 0 : { *(.line) } 73 1.1 matt /* These must appear regardless of . */ 74 1.1 matt .gptab.sdata : { *(.gptab.data) *(.gptab.sdata) } 75 1.1 matt .gptab.sbss : { *(.gptab.bss) *(.gptab.sbss) } 76 1.1 matt } 77