2009-08-28 00:07:35 +08:00
|
|
|
INCLUDE ../common/ldscript.common
|
2009-08-27 12:25:34 +08:00
|
|
|
|
2009-08-28 00:07:35 +08:00
|
|
|
ENTRY(flashstart)
|
2009-04-09 14:43:20 +08:00
|
|
|
SECTIONS
|
|
|
|
{
|
2009-08-27 12:25:34 +08:00
|
|
|
. = 0;
|
|
|
|
|
2009-08-29 14:14:28 +08:00
|
|
|
.bootphase1 : {
|
2009-08-27 12:25:34 +08:00
|
|
|
*(.startup)
|
|
|
|
*(.bootphase1)
|
2009-08-28 14:40:44 +08:00
|
|
|
|
|
|
|
/* It seems to be impossible to flush align a section at the
|
|
|
|
end of a memory segment. Instead, we'll put the version_information
|
|
|
|
wherever the linker wants it, and then put a pointer to the start
|
|
|
|
of the version information at the end of the section.
|
|
|
|
-- Henryk Plötz <henryk@ploetzli.ch> 2009-08-28 */
|
|
|
|
|
2009-08-29 14:14:28 +08:00
|
|
|
_version_information_start = ABSOLUTE(.);
|
2009-08-28 14:40:44 +08:00
|
|
|
*(.version_information);
|
|
|
|
|
2009-09-07 17:53:45 +08:00
|
|
|
/* Why doesn't this work even though _bootphase1_version_pointer = 0x1001fc?
|
2009-08-29 14:14:28 +08:00
|
|
|
. = _bootphase1_version_pointer - ORIGIN(bootphase1); */
|
|
|
|
/* This works, apparently it fools the linker into accepting an absolute address */
|
|
|
|
. = _bootphase1_version_pointer - ORIGIN(bootphase1) + ORIGIN(bootphase1);
|
2009-08-28 14:40:44 +08:00
|
|
|
LONG(_version_information_start)
|
2009-08-27 12:25:34 +08:00
|
|
|
} >bootphase1
|
|
|
|
|
2009-08-31 22:52:59 +08:00
|
|
|
__bootphase2_src_start__ = ORIGIN(bootphase2);
|
2009-08-29 14:14:28 +08:00
|
|
|
.bootphase2 : {
|
2009-08-27 12:25:34 +08:00
|
|
|
__bootphase2_start__ = .;
|
|
|
|
*(.startphase2)
|
|
|
|
*(.text)
|
2009-09-07 17:53:45 +08:00
|
|
|
*(.eh_frame)
|
2009-08-27 12:25:34 +08:00
|
|
|
*(.glue_7)
|
2009-08-27 12:46:31 +08:00
|
|
|
*(.glue_7t)
|
2009-08-27 12:25:34 +08:00
|
|
|
*(.rodata)
|
|
|
|
*(.data)
|
|
|
|
. = ALIGN( 32 / 8 );
|
|
|
|
__bootphase2_end__ = .;
|
|
|
|
} >ram AT>bootphase2
|
|
|
|
|
|
|
|
.bss : {
|
|
|
|
__bss_start__ = .;
|
|
|
|
*(.bss)
|
|
|
|
} >ram
|
|
|
|
|
|
|
|
. = ALIGN( 32 / 8 );
|
2009-04-09 14:43:20 +08:00
|
|
|
__bss_end__ = .;
|
2009-09-01 22:44:38 +08:00
|
|
|
|
|
|
|
.commonarea (NOLOAD) : {
|
|
|
|
*(.commonarea)
|
|
|
|
} >commonarea
|
2009-04-09 14:43:20 +08:00
|
|
|
}
|