1/* 2 * ld.script for compressed kernel support of MIPS 3 * 4 * Copyright (C) 2009 Lemote Inc. 5 * Author: Wu Zhangjin <wuzj@lemote.com> 6 */ 7 8OUTPUT_ARCH(mips) 9ENTRY(start) 10SECTIONS 11{ 12 /* . = VMLINUZ_LOAD_ADDRESS */ 13 /* read-only */ 14 _text = .; /* Text and read-only data */ 15 .text : { 16 _ftext = . ; 17 *(.text) 18 *(.rodata) 19 } = 0 20 _etext = .; /* End of text section */ 21 22 /* writable */ 23 .data : { /* Data */ 24 _fdata = . ; 25 *(.data) 26 /* Put the compressed image here, so bss is on the end. */ 27 __image_begin = .; 28 *(.image) 29 __image_end = .; 30 CONSTRUCTORS 31 } 32 .sdata : { *(.sdata) } 33 . = ALIGN(4); 34 _edata = .; /* End of data section */ 35 36 /* BSS */ 37 __bss_start = .; 38 _fbss = .; 39 .sbss : { *(.sbss) *(.scommon) } 40 .bss : { 41 *(.dynbss) 42 *(.bss) 43 *(COMMON) 44 } 45 . = ALIGN(4); 46 _end = . ; 47 48 /* These are needed for ELF backends which have not yet been converted 49 * to the new style linker. */ 50 51 .stab 0 : { *(.stab) } 52 .stabstr 0 : { *(.stabstr) } 53 54 /* These must appear regardless of . */ 55 .gptab.sdata : { *(.gptab.data) *(.gptab.sdata) } 56 .gptab.sbss : { *(.gptab.bss) *(.gptab.sbss) } 57 58 /* Sections to be discarded */ 59 /DISCARD/ : { 60 *(.MIPS.options) 61 *(.options) 62 *(.pdr) 63 *(.reginfo) 64 *(.comment) 65 *(.note) 66 } 67} 68