2008-06-27 23:24:34 +00:00
|
|
|
#include "config.h"
|
|
|
|
|
2008-10-18 22:28:59 +00:00
|
|
|
ENTRY(_start)
|
2008-10-05 19:52:48 +00:00
|
|
|
OUTPUT_FORMAT(elf32-bigarm)
|
2008-06-27 23:24:34 +00:00
|
|
|
OUTPUT_ARCH(arm)
|
2008-10-18 22:28:59 +00:00
|
|
|
STARTUP(target/arm/s5l8700/crt0.o)
|
2008-06-27 23:24:34 +00:00
|
|
|
|
|
|
|
/* DRAMORIG is in fact 0x8000000 but remapped to 0x0 */
|
2008-10-18 22:28:59 +00:00
|
|
|
#define DRAMORIG 0x8000000
|
2008-06-27 23:24:34 +00:00
|
|
|
#define DRAMSIZE 16M
|
2008-09-18 18:20:51 +00:00
|
|
|
|
2008-06-27 23:24:34 +00:00
|
|
|
#define IRAMORIG 0x22000000
|
|
|
|
#define IRAMSIZE 256K
|
|
|
|
|
2008-09-18 18:20:51 +00:00
|
|
|
#ifdef MEIZU_M6SL
|
|
|
|
#define DFULOADADDR IRAMORIG
|
|
|
|
#else
|
|
|
|
#define DFULOADADDR (IRAMORIG+0x20000)
|
|
|
|
#endif
|
|
|
|
|
2008-06-27 23:24:34 +00:00
|
|
|
/* This is not available in all versions of the S5L8700 */
|
|
|
|
#define FLASHORIG 0x24000000
|
|
|
|
#define FLASHSIZE 1M
|
|
|
|
|
2008-10-18 22:28:59 +00:00
|
|
|
MEMORY
|
|
|
|
{
|
|
|
|
DRAM : ORIGIN = DRAMORIG, LENGTH = DRAMSIZE
|
|
|
|
IRAM : ORIGIN = IRAMORIG, LENGTH = IRAMSIZE
|
|
|
|
FLASH : ORIGIN = FLASHORIG, LENGTH = FLASHSIZE
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2008-06-27 23:24:34 +00:00
|
|
|
SECTIONS
|
|
|
|
{
|
2008-10-18 22:28:59 +00:00
|
|
|
.intvect : {
|
|
|
|
_intvectstart = . ;
|
|
|
|
*(.intvect)
|
|
|
|
_intvectend = _newstart ;
|
|
|
|
} >IRAM AT> FLASH
|
|
|
|
_intvectcopy = LOADADDR(.intvect) ;
|
2008-06-27 23:24:34 +00:00
|
|
|
|
|
|
|
.text : {
|
|
|
|
*(.init.text)
|
|
|
|
*(.text*)
|
2008-10-18 22:28:59 +00:00
|
|
|
*(.glue_7*)
|
|
|
|
} > FLASH
|
|
|
|
|
|
|
|
.rodata : {
|
|
|
|
*(.rodata*)
|
|
|
|
. = ALIGN(0x4);
|
|
|
|
} > FLASH
|
2008-06-27 23:24:34 +00:00
|
|
|
|
|
|
|
.data : {
|
2008-10-18 22:28:59 +00:00
|
|
|
_datastart = . ;
|
2008-06-27 23:24:34 +00:00
|
|
|
*(.irodata)
|
2008-10-18 22:28:59 +00:00
|
|
|
*(.icode)
|
2008-06-27 23:24:34 +00:00
|
|
|
*(.idata)
|
|
|
|
*(.data*)
|
|
|
|
*(.ncdata*);
|
2008-10-18 22:28:59 +00:00
|
|
|
. = ALIGN(0x4);
|
2008-06-27 23:24:34 +00:00
|
|
|
_dataend = . ;
|
2008-10-18 22:28:59 +00:00
|
|
|
} > IRAM AT> FLASH
|
|
|
|
_datacopy = LOADADDR(.data) ;
|
2008-06-27 23:24:34 +00:00
|
|
|
|
|
|
|
.stack :
|
|
|
|
{
|
|
|
|
*(.stack)
|
|
|
|
_stackbegin = .;
|
2009-07-05 19:09:14 +00:00
|
|
|
stackbegin = .;
|
2008-10-18 22:28:59 +00:00
|
|
|
. += 0x2000;
|
2008-06-27 23:24:34 +00:00
|
|
|
_stackend = .;
|
2009-07-05 19:09:14 +00:00
|
|
|
stackend = .;
|
2008-10-18 22:28:59 +00:00
|
|
|
_irqstackbegin = .;
|
|
|
|
. += 0x400;
|
|
|
|
_irqstackend = .;
|
|
|
|
_fiqstackbegin = .;
|
|
|
|
. += 0x400;
|
|
|
|
_fiqstackend = .;
|
|
|
|
} > IRAM
|
2008-06-27 23:24:34 +00:00
|
|
|
|
|
|
|
.bss : {
|
|
|
|
_edata = .;
|
|
|
|
*(.bss*);
|
|
|
|
*(.ibss);
|
|
|
|
*(.ncbss*);
|
2008-10-18 22:28:59 +00:00
|
|
|
*(COMMON);
|
|
|
|
. = ALIGN(0x4);
|
2008-06-27 23:24:34 +00:00
|
|
|
_end = .;
|
2008-10-18 22:28:59 +00:00
|
|
|
} > IRAM
|
2008-06-27 23:24:34 +00:00
|
|
|
}
|