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