0001 /*
0002 * ld.script for compressed kernel support of MIPS
0003 *
0004 * Copyright (C) 2009 Lemote Inc.
0005 * Author: Wu Zhangjin <wuzhanjing@gmail.com>
0006 * Copyright (C) 2010 "Wu Zhangjin" <wuzhanjing@gmail.com>
0007 */
0008
0009 OUTPUT_ARCH(mips)
0010 ENTRY(start)
0011 PHDRS {
0012 text PT_LOAD FLAGS(7); /* RWX */
0013 }
0014 SECTIONS
0015 {
0016 /* Text and read-only data */
0017 /* . = VMLINUZ_LOAD_ADDRESS; */
0018 .text : {
0019 *(.text)
0020 *(.rodata)
0021 }: text
0022 /* End of text section */
0023
0024 /* Writable data */
0025 .data : {
0026 *(.data)
0027 /* Put the compressed image here */
0028 __image_begin = .;
0029 *(.image)
0030 __image_end = .;
0031 CONSTRUCTORS
0032 . = ALIGN(16);
0033 }
0034
0035 .appended_dtb : {
0036 __appended_dtb = .;
0037 /* leave space for appended DTB */
0038 . += 0x100000;
0039 }
0040
0041 _edata = .;
0042 /* End of data section */
0043
0044 /* BSS */
0045 .bss : {
0046 *(.bss)
0047 }
0048 . = ALIGN(16);
0049 _end = .;
0050
0051 /* Sections to be discarded */
0052 /DISCARD/ : {
0053 *(.MIPS.options)
0054 *(.options)
0055 *(.pdr)
0056 *(.reginfo)
0057 *(.comment)
0058 *(.note)
0059 }
0060 }