2009-12-10 22:55:13 +08:00
|
|
|
/*
|
|
|
|
* ld.script for compressed kernel support of MIPS
|
|
|
|
*
|
|
|
|
* Copyright (C) 2009 Lemote Inc.
|
2010-06-16 15:52:19 +08:00
|
|
|
* Author: Wu Zhangjin <wuzhanjing@gmail.com>
|
|
|
|
* Copyright (C) 2010 "Wu Zhangjin" <wuzhanjing@gmail.com>
|
2009-12-10 22:55:13 +08:00
|
|
|
*/
|
|
|
|
|
2009-10-14 18:12:16 +08:00
|
|
|
OUTPUT_ARCH(mips)
|
|
|
|
ENTRY(start)
|
2013-09-12 22:42:05 +08:00
|
|
|
PHDRS {
|
|
|
|
text PT_LOAD FLAGS(7); /* RWX */
|
|
|
|
}
|
2009-10-14 18:12:16 +08:00
|
|
|
SECTIONS
|
|
|
|
{
|
2010-06-16 15:52:19 +08:00
|
|
|
/* Text and read-only data */
|
|
|
|
/* . = VMLINUZ_LOAD_ADDRESS; */
|
|
|
|
.text : {
|
2009-12-10 22:55:13 +08:00
|
|
|
*(.text)
|
|
|
|
*(.rodata)
|
2013-09-12 22:42:05 +08:00
|
|
|
}: text
|
2010-06-16 15:52:19 +08:00
|
|
|
/* End of text section */
|
2009-10-14 18:12:16 +08:00
|
|
|
|
2010-06-16 15:52:19 +08:00
|
|
|
/* Writable data */
|
|
|
|
.data : {
|
2009-12-10 22:55:13 +08:00
|
|
|
*(.data)
|
2010-06-16 15:52:19 +08:00
|
|
|
/* Put the compressed image here */
|
2009-12-10 22:55:13 +08:00
|
|
|
__image_begin = .;
|
|
|
|
*(.image)
|
|
|
|
__image_end = .;
|
|
|
|
CONSTRUCTORS
|
2015-04-12 18:24:59 +08:00
|
|
|
. = ALIGN(16);
|
2009-12-10 22:55:13 +08:00
|
|
|
}
|
2015-04-12 18:24:59 +08:00
|
|
|
__appended_dtb = .;
|
|
|
|
/* leave space for appended DTB */
|
|
|
|
. += 0x100000;
|
|
|
|
|
2010-06-16 15:52:19 +08:00
|
|
|
_edata = .;
|
|
|
|
/* End of data section */
|
2009-10-14 18:12:16 +08:00
|
|
|
|
2009-12-10 22:55:13 +08:00
|
|
|
/* BSS */
|
2010-06-16 15:52:19 +08:00
|
|
|
.bss : {
|
2009-12-10 22:55:13 +08:00
|
|
|
*(.bss)
|
|
|
|
}
|
2010-06-16 15:52:19 +08:00
|
|
|
. = ALIGN(16);
|
|
|
|
_end = .;
|
2009-10-14 18:12:16 +08:00
|
|
|
|
2009-12-10 22:55:13 +08:00
|
|
|
/* Sections to be discarded */
|
2010-06-16 15:52:19 +08:00
|
|
|
/DISCARD/ : {
|
2009-12-10 22:55:13 +08:00
|
|
|
*(.MIPS.options)
|
|
|
|
*(.options)
|
|
|
|
*(.pdr)
|
|
|
|
*(.reginfo)
|
|
|
|
*(.comment)
|
|
|
|
*(.note)
|
|
|
|
}
|
2009-10-14 18:12:16 +08:00
|
|
|
}
|