2009-12-10 22:55:13 +08:00
|
|
|
/*
|
|
|
|
* ld.script for compressed kernel support of MIPS
|
|
|
|
*
|
|
|
|
* Copyright (C) 2009 Lemote Inc.
|
|
|
|
* Author: Wu Zhangjin <wuzj@lemote.com>
|
|
|
|
*/
|
|
|
|
|
2009-10-14 18:12:16 +08:00
|
|
|
OUTPUT_ARCH(mips)
|
|
|
|
ENTRY(start)
|
|
|
|
SECTIONS
|
|
|
|
{
|
2009-12-10 22:55:13 +08:00
|
|
|
/* . = VMLINUZ_LOAD_ADDRESS */
|
|
|
|
/* read-only */
|
|
|
|
_text = .; /* Text and read-only data */
|
|
|
|
.text : {
|
|
|
|
_ftext = . ;
|
|
|
|
*(.text)
|
|
|
|
*(.rodata)
|
|
|
|
} = 0
|
|
|
|
_etext = .; /* End of text section */
|
2009-10-14 18:12:16 +08:00
|
|
|
|
2009-12-10 22:55:13 +08:00
|
|
|
/* writable */
|
|
|
|
.data : { /* Data */
|
|
|
|
_fdata = . ;
|
|
|
|
*(.data)
|
|
|
|
/* Put the compressed image here, so bss is on the end. */
|
|
|
|
__image_begin = .;
|
|
|
|
*(.image)
|
|
|
|
__image_end = .;
|
|
|
|
CONSTRUCTORS
|
|
|
|
}
|
|
|
|
.sdata : { *(.sdata) }
|
|
|
|
. = ALIGN(4);
|
|
|
|
_edata = .; /* End of data section */
|
2009-10-14 18:12:16 +08:00
|
|
|
|
2009-12-10 22:55:13 +08:00
|
|
|
/* BSS */
|
|
|
|
__bss_start = .;
|
|
|
|
_fbss = .;
|
|
|
|
.sbss : { *(.sbss) *(.scommon) }
|
|
|
|
.bss : {
|
|
|
|
*(.dynbss)
|
|
|
|
*(.bss)
|
|
|
|
*(COMMON)
|
|
|
|
}
|
|
|
|
. = ALIGN(4);
|
|
|
|
_end = . ;
|
2009-10-14 18:12:16 +08:00
|
|
|
|
2009-12-10 22:55:13 +08:00
|
|
|
/* These are needed for ELF backends which have not yet been converted
|
|
|
|
* to the new style linker. */
|
2009-10-14 18:12:16 +08:00
|
|
|
|
2009-12-10 22:55:13 +08:00
|
|
|
.stab 0 : { *(.stab) }
|
|
|
|
.stabstr 0 : { *(.stabstr) }
|
2009-10-14 18:12:16 +08:00
|
|
|
|
2009-12-10 22:55:13 +08:00
|
|
|
/* These must appear regardless of . */
|
|
|
|
.gptab.sdata : { *(.gptab.data) *(.gptab.sdata) }
|
|
|
|
.gptab.sbss : { *(.gptab.bss) *(.gptab.sbss) }
|
2009-10-14 18:12:16 +08:00
|
|
|
|
2009-12-10 22:55:13 +08:00
|
|
|
/* Sections to be discarded */
|
|
|
|
/DISCARD/ : {
|
|
|
|
*(.MIPS.options)
|
|
|
|
*(.options)
|
|
|
|
*(.pdr)
|
|
|
|
*(.reginfo)
|
|
|
|
*(.comment)
|
|
|
|
*(.note)
|
|
|
|
}
|
2009-10-14 18:12:16 +08:00
|
|
|
}
|