2011-05-30 21:10:37 +00:00
|
|
|
#include "config.h"
|
|
|
|
|
2020-07-15 18:18:09 +00:00
|
|
|
ENTRY(__start)
|
2011-05-30 21:10:37 +00:00
|
|
|
#ifdef ROCKBOX_LITTLE_ENDIAN
|
|
|
|
OUTPUT_FORMAT(elf32-littlearm)
|
|
|
|
#else
|
|
|
|
OUTPUT_FORMAT(elf32-bigarm)
|
|
|
|
#endif
|
|
|
|
OUTPUT_ARCH(arm)
|
|
|
|
STARTUP(target/arm/rk27xx/crt0.o)
|
|
|
|
|
2012-02-28 14:51:09 +00:00
|
|
|
#define DRAMORIG 0x60700000
|
|
|
|
#define DRAMSIZE (MEMORYSIZE * 0x100000 - 0x700000)
|
2011-05-30 21:10:37 +00:00
|
|
|
|
|
|
|
#define IRAMORIG 0x00000000
|
|
|
|
#define IRAMSIZE 4K
|
|
|
|
|
|
|
|
MEMORY
|
|
|
|
{
|
|
|
|
DRAM : ORIGIN = DRAMORIG, LENGTH = DRAMSIZE
|
|
|
|
IRAM : ORIGIN = IRAMORIG, LENGTH = IRAMSIZE
|
|
|
|
}
|
|
|
|
|
|
|
|
SECTIONS
|
|
|
|
{
|
2012-02-28 14:51:09 +00:00
|
|
|
.relocstart (NOLOAD) : {
|
|
|
|
_relocstart = .;
|
|
|
|
} > DRAM
|
2011-05-30 21:10:37 +00:00
|
|
|
|
|
|
|
.text : {
|
|
|
|
*(.init.text)
|
|
|
|
*(.text*)
|
2012-02-28 14:51:09 +00:00
|
|
|
*(.icode*)
|
2011-05-30 21:10:37 +00:00
|
|
|
*(.glue_7*)
|
2012-02-28 14:51:09 +00:00
|
|
|
} > DRAM
|
|
|
|
|
|
|
|
.intvect : {
|
|
|
|
_intvectstart = . ;
|
|
|
|
KEEP(*(.intvect))
|
|
|
|
_intvectend = . ;
|
|
|
|
} > IRAM AT > DRAM
|
|
|
|
_intvectcopy = LOADADDR(.intvect) ;
|
|
|
|
|
|
|
|
.rodata : {
|
|
|
|
*(.rodata*)
|
|
|
|
*(.irodata*)
|
|
|
|
. = ALIGN(0x4);
|
2011-05-30 21:10:37 +00:00
|
|
|
} > DRAM
|
|
|
|
|
|
|
|
.data : {
|
|
|
|
*(.data*)
|
2012-02-28 14:51:09 +00:00
|
|
|
*(.idata*)
|
2011-05-30 21:10:37 +00:00
|
|
|
. = ALIGN(0x4);
|
|
|
|
} > DRAM
|
|
|
|
|
2012-02-28 14:51:09 +00:00
|
|
|
.relocend (NOLOAD) : {
|
|
|
|
_relocend = .;
|
|
|
|
} > DRAM
|
2011-05-30 21:10:37 +00:00
|
|
|
|
|
|
|
.stack (NOLOAD) :
|
|
|
|
{
|
|
|
|
*(.stack)
|
|
|
|
_stackbegin = .;
|
|
|
|
stackbegin = .;
|
|
|
|
. += 0x2000;
|
|
|
|
_stackend = .;
|
|
|
|
stackend = .;
|
|
|
|
_irqstackbegin = .;
|
|
|
|
. += 0x400;
|
|
|
|
_irqstackend = .;
|
|
|
|
_fiqstackbegin = .;
|
|
|
|
. += 0x400;
|
|
|
|
_fiqstackend = .;
|
|
|
|
} > DRAM
|
|
|
|
|
|
|
|
.bss (NOLOAD) : {
|
|
|
|
_edata = .;
|
|
|
|
*(.bss*);
|
|
|
|
*(.ibss);
|
|
|
|
*(COMMON);
|
|
|
|
. = ALIGN(0x4);
|
|
|
|
_end = .;
|
|
|
|
} > DRAM
|
|
|
|
}
|