2008-10-12 16:46:01 +00:00
|
|
|
#include "config.h"
|
2009-05-20 21:09:53 +00:00
|
|
|
#include "cpu.h"
|
2008-10-12 16:46:01 +00:00
|
|
|
|
|
|
|
ENTRY(start)
|
|
|
|
OUTPUT_FORMAT(elf32-littlearm)
|
|
|
|
OUTPUT_ARCH(arm)
|
|
|
|
STARTUP(target/arm/crt0.o)
|
|
|
|
|
2010-06-18 17:33:51 +00:00
|
|
|
#define LOAD_SIZE 0x100000 /* Reserve 1MB for loading the firmware */
|
2008-10-30 20:01:01 +00:00
|
|
|
|
|
|
|
MEMORY
|
|
|
|
{
|
2010-06-18 17:33:51 +00:00
|
|
|
IRAM : ORIGIN = IRAM_ORIG, LENGTH = IRAM_SIZE
|
|
|
|
DRAM : ORIGIN = DRAM_ORIG + LOAD_SIZE, LENGTH = DRAM_SIZE - LOAD_SIZE - TTB_SIZE
|
2008-10-30 20:01:01 +00:00
|
|
|
}
|
|
|
|
|
2008-10-12 16:46:01 +00:00
|
|
|
SECTIONS
|
|
|
|
{
|
2010-06-18 17:33:51 +00:00
|
|
|
. = IRAM_ORIG;
|
2008-10-12 16:46:01 +00:00
|
|
|
|
|
|
|
.text : {
|
|
|
|
*(.init.text)
|
2008-10-30 20:01:01 +00:00
|
|
|
*(.glue_7)
|
|
|
|
*(.glue_7t)
|
2008-10-12 16:46:01 +00:00
|
|
|
*(.text*)
|
2011-12-17 02:00:59 +00:00
|
|
|
*(.icode*)
|
2010-06-18 17:33:51 +00:00
|
|
|
} > IRAM
|
2008-10-12 16:46:01 +00:00
|
|
|
|
|
|
|
.data : {
|
|
|
|
*(.data*)
|
2008-10-30 20:01:01 +00:00
|
|
|
*(.rodata*)
|
2008-10-12 16:46:01 +00:00
|
|
|
_dataend = . ;
|
2010-06-18 17:33:51 +00:00
|
|
|
} > IRAM
|
2008-10-12 16:46:01 +00:00
|
|
|
|
2010-03-08 23:16:57 +00:00
|
|
|
.stack (NOLOAD) :
|
2008-10-12 16:46:01 +00:00
|
|
|
{
|
|
|
|
*(.stack)
|
|
|
|
_stackbegin = .;
|
|
|
|
stackbegin = .;
|
|
|
|
. += 0x2000;
|
|
|
|
_stackend = .;
|
|
|
|
stackend = .;
|
2010-06-18 17:33:51 +00:00
|
|
|
} > IRAM
|
2008-10-12 16:46:01 +00:00
|
|
|
|
2010-03-08 23:16:57 +00:00
|
|
|
.bss (NOLOAD) : {
|
2008-10-12 16:46:01 +00:00
|
|
|
_edata = .;
|
|
|
|
*(.bss*);
|
2008-11-07 00:15:53 +00:00
|
|
|
*(COMMON)
|
2008-10-12 16:46:01 +00:00
|
|
|
_end = .;
|
2010-06-18 17:33:51 +00:00
|
|
|
} > DRAM
|
2008-10-12 16:46:01 +00:00
|
|
|
}
|