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-02-22 05:41:05 +00:00
|
|
|
#ifdef SANSA_CLIPV2
|
2009-12-31 19:15:20 +00:00
|
|
|
#define RAMORIG 0x0 /* DRAM */
|
|
|
|
#define RAMSIZE (MEM*0x100000)
|
|
|
|
#else
|
|
|
|
#define RAMORIG 0x81000000 /* IRAM */
|
|
|
|
#define RAMSIZE 0x50000
|
|
|
|
#endif
|
2008-10-30 20:01:01 +00:00
|
|
|
|
|
|
|
MEMORY
|
|
|
|
{
|
2009-12-31 19:15:20 +00:00
|
|
|
RAM : ORIGIN = RAMORIG, LENGTH = RAMSIZE
|
2008-10-30 20:01:01 +00:00
|
|
|
}
|
|
|
|
|
2008-10-12 16:46:01 +00:00
|
|
|
SECTIONS
|
|
|
|
{
|
2009-12-31 19:15:20 +00:00
|
|
|
. = RAMORIG;
|
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*)
|
2009-12-31 19:15:20 +00:00
|
|
|
} > RAM
|
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 = . ;
|
2009-12-31 19:15:20 +00:00
|
|
|
} > RAM
|
2008-10-12 16:46:01 +00:00
|
|
|
|
|
|
|
.stack :
|
|
|
|
{
|
|
|
|
*(.stack)
|
|
|
|
_stackbegin = .;
|
|
|
|
stackbegin = .;
|
|
|
|
. += 0x2000;
|
|
|
|
_stackend = .;
|
|
|
|
stackend = .;
|
2009-12-31 19:15:20 +00:00
|
|
|
} > RAM
|
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 = .;
|
2009-12-31 19:15:20 +00:00
|
|
|
} > RAM
|
2008-10-12 16:46:01 +00:00
|
|
|
}
|