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)
|
|
|
|
|
2009-05-20 21:09:53 +00:00
|
|
|
/*
|
|
|
|
No need for DRAM in our bootloader
|
|
|
|
#define DRAMSIZE (MEMORYSIZE * 0x100000) - TTB_SIZE
|
2008-10-30 20:01:01 +00:00
|
|
|
#define DRAMORIG 0x30000000
|
2009-05-20 21:09:53 +00:00
|
|
|
*/
|
|
|
|
#define IRAMORIG 0x81000000
|
2008-10-30 20:01:01 +00:00
|
|
|
#define IRAMSIZE 0x50000
|
|
|
|
|
|
|
|
MEMORY
|
|
|
|
{
|
2009-05-20 21:09:53 +00:00
|
|
|
/*DRAM : ORIGIN = DRAMORIG, LENGTH = DRAMSIZE*/
|
2008-10-30 20:01:01 +00:00
|
|
|
IRAM : ORIGIN = IRAMORIG, LENGTH = IRAMSIZE
|
|
|
|
}
|
|
|
|
|
2008-10-12 16:46:01 +00:00
|
|
|
SECTIONS
|
|
|
|
{
|
2008-10-30 20:01:01 +00:00
|
|
|
. = IRAMORIG;
|
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*)
|
2008-10-30 20:01:01 +00:00
|
|
|
} > IRAM
|
2008-10-12 16:46:01 +00:00
|
|
|
|
|
|
|
.data : {
|
|
|
|
*(.icode)
|
|
|
|
*(.irodata)
|
|
|
|
*(.idata)
|
|
|
|
*(.data*)
|
2008-10-30 20:01:01 +00:00
|
|
|
*(.ncdata*)
|
|
|
|
*(.rodata*)
|
2008-10-12 16:46:01 +00:00
|
|
|
_dataend = . ;
|
2008-10-30 20:01:01 +00:00
|
|
|
} > IRAM
|
2008-10-12 16:46:01 +00:00
|
|
|
|
|
|
|
.stack :
|
|
|
|
{
|
|
|
|
*(.stack)
|
|
|
|
_stackbegin = .;
|
|
|
|
stackbegin = .;
|
|
|
|
. += 0x2000;
|
|
|
|
_stackend = .;
|
|
|
|
stackend = .;
|
2008-10-30 20:01:01 +00:00
|
|
|
} > IRAM
|
2008-10-12 16:46:01 +00:00
|
|
|
|
|
|
|
.bss : {
|
|
|
|
_edata = .;
|
|
|
|
*(.bss*);
|
|
|
|
*(.ibss);
|
2008-11-07 00:15:53 +00:00
|
|
|
*(COMMON)
|
2008-10-12 16:46:01 +00:00
|
|
|
*(.ncbss*);
|
|
|
|
_end = .;
|
2008-10-30 20:01:01 +00:00
|
|
|
} > IRAM
|
2008-10-12 16:46:01 +00:00
|
|
|
}
|