2008-07-14 15:03:10 +00:00
|
|
|
#include "config.h"
|
|
|
|
|
2008-07-30 09:54:25 +00:00
|
|
|
OUTPUT_FORMAT("elf32-littlemips")
|
2008-07-14 15:03:10 +00:00
|
|
|
OUTPUT_ARCH(MIPS)
|
|
|
|
ENTRY(_start)
|
|
|
|
STARTUP(target/mips/ingenic_jz47xx/crt0.o)
|
|
|
|
|
2009-02-09 10:02:38 +00:00
|
|
|
#define DRAMSIZE ((MEMORYSIZE-4) * 0x100000)
|
2008-07-14 15:03:10 +00:00
|
|
|
|
2009-07-17 14:30:42 +00:00
|
|
|
#define DRAMORIG 0x80E04000
|
2008-07-14 15:03:10 +00:00
|
|
|
#define IRAMORIG 0x80000000
|
|
|
|
#define IRAMSIZE 16K
|
|
|
|
|
|
|
|
MEMORY
|
|
|
|
{
|
|
|
|
DRAM : ORIGIN = DRAMORIG, LENGTH = DRAMSIZE
|
|
|
|
IRAM : ORIGIN = IRAMORIG, LENGTH = IRAMSIZE
|
|
|
|
}
|
|
|
|
|
|
|
|
SECTIONS
|
|
|
|
{
|
|
|
|
. = DRAMORIG;
|
|
|
|
|
2008-08-09 23:31:38 +00:00
|
|
|
.text :
|
|
|
|
{
|
2008-07-14 15:03:10 +00:00
|
|
|
_loadaddress = .;
|
|
|
|
*(.init.text);
|
|
|
|
*(.text*);
|
|
|
|
} > DRAM
|
2009-06-18 18:27:53 +00:00
|
|
|
|
2008-07-14 15:03:10 +00:00
|
|
|
. = ALIGN(4);
|
|
|
|
|
|
|
|
.rodata :
|
|
|
|
{
|
|
|
|
*(.rodata*);
|
|
|
|
} > DRAM
|
2009-06-18 18:27:53 +00:00
|
|
|
|
2009-02-09 10:02:38 +00:00
|
|
|
. = ALIGN(4);
|
2008-07-14 15:03:10 +00:00
|
|
|
|
2008-08-09 23:31:38 +00:00
|
|
|
.data :
|
|
|
|
{
|
2008-07-14 15:03:10 +00:00
|
|
|
*(.data*);
|
|
|
|
*(.sdata*);
|
2009-02-09 10:02:38 +00:00
|
|
|
*(.rel.dyn);
|
2008-07-14 15:03:10 +00:00
|
|
|
} > DRAM
|
2009-06-18 18:27:53 +00:00
|
|
|
|
2009-02-09 10:02:38 +00:00
|
|
|
. = ALIGN(4);
|
2009-06-18 18:27:53 +00:00
|
|
|
|
2009-02-09 10:02:38 +00:00
|
|
|
.iram IRAMORIG:
|
2008-08-09 23:31:38 +00:00
|
|
|
{
|
2009-02-09 10:02:38 +00:00
|
|
|
_iramstart = .;
|
2011-12-18 06:43:08 +00:00
|
|
|
KEEP(*(.vectors.1));
|
2009-02-09 10:02:38 +00:00
|
|
|
. = 0x100;
|
2011-12-18 06:43:08 +00:00
|
|
|
KEEP(*(.vectors.2));
|
2009-02-09 10:02:38 +00:00
|
|
|
. = 0x180;
|
2011-12-18 06:43:08 +00:00
|
|
|
KEEP(*(.vectors.3));
|
2009-02-09 10:02:38 +00:00
|
|
|
. = 0x200;
|
2011-12-18 06:43:08 +00:00
|
|
|
KEEP(*(.vectors.4));
|
|
|
|
KEEP(*(.vectors));
|
2009-06-18 18:27:53 +00:00
|
|
|
|
2009-02-09 10:02:38 +00:00
|
|
|
*(.icode);
|
|
|
|
*(.irodata);
|
|
|
|
*(.idata);
|
|
|
|
KEEP(*(.vectors*))
|
|
|
|
_iramend = .;
|
|
|
|
} > IRAM AT> DRAM
|
|
|
|
_iramcopy = LOADADDR(.iram);
|
2009-06-18 18:27:53 +00:00
|
|
|
|
2008-07-14 15:03:10 +00:00
|
|
|
. = ALIGN(4);
|
2009-06-18 18:27:53 +00:00
|
|
|
|
2009-02-09 10:02:38 +00:00
|
|
|
.bss (NOLOAD):
|
2008-07-14 15:03:10 +00:00
|
|
|
{
|
|
|
|
_edata = .;
|
|
|
|
*(.sbss*);
|
|
|
|
*(.bss*);
|
2009-06-18 18:27:53 +00:00
|
|
|
*(.ibss*);
|
2009-02-09 10:02:38 +00:00
|
|
|
*(COMMON);
|
2008-08-06 20:39:02 +00:00
|
|
|
*(.scommon*);
|
2008-07-14 15:03:10 +00:00
|
|
|
_end = .;
|
|
|
|
} > DRAM
|
2009-06-18 18:27:53 +00:00
|
|
|
|
2009-02-09 10:02:38 +00:00
|
|
|
_bootend = .;
|
2009-06-18 18:27:53 +00:00
|
|
|
|
2009-02-09 10:02:38 +00:00
|
|
|
.stack (NOLOAD):
|
2008-08-26 21:48:49 +00:00
|
|
|
{
|
|
|
|
*(.stack)
|
|
|
|
stackbegin = .;
|
2020-07-15 15:02:28 +00:00
|
|
|
. += 0x1d00;
|
2008-08-26 21:48:49 +00:00
|
|
|
stackend = .;
|
2018-12-26 03:28:14 +00:00
|
|
|
irqstackbegin = .;
|
2020-07-15 15:02:28 +00:00
|
|
|
. += 0x400;
|
2018-12-26 03:28:14 +00:00
|
|
|
irqstackend = .;
|
2008-08-26 21:48:49 +00:00
|
|
|
} > IRAM
|
2008-07-14 15:03:10 +00:00
|
|
|
}
|