2002-05-02 14:05:51 +00:00
|
|
|
ENTRY(start)
|
2002-03-28 15:09:10 +00:00
|
|
|
OUTPUT_FORMAT(elf32-sh)
|
2002-05-29 09:12:34 +00:00
|
|
|
INPUT(crt0.o)
|
2002-08-01 08:12:17 +00:00
|
|
|
|
2003-02-26 16:05:30 +00:00
|
|
|
#ifdef DEBUG
|
|
|
|
#define DRAMSIZE 0x1f0000
|
|
|
|
#define ORIGADDR 0x09010000
|
2003-02-26 16:45:10 +00:00
|
|
|
#define ENDADDR 0x09200000
|
2003-02-26 16:05:30 +00:00
|
|
|
#else
|
2003-02-26 09:18:13 +00:00
|
|
|
#define DRAMSIZE (MEMORYSIZE * 0x100000)
|
2003-02-26 16:05:30 +00:00
|
|
|
#define ORIGADDR 0x09000000
|
2003-02-26 16:45:10 +00:00
|
|
|
#define ENDADDR (ORIGADDR + DRAMSIZE)
|
2003-02-26 16:05:30 +00:00
|
|
|
#endif
|
2003-02-26 09:18:13 +00:00
|
|
|
|
2002-08-01 08:12:17 +00:00
|
|
|
MEMORY
|
|
|
|
{
|
2003-02-26 16:05:30 +00:00
|
|
|
DRAM : ORIGIN = ORIGADDR, LENGTH = DRAMSIZE
|
2002-08-01 08:12:17 +00:00
|
|
|
IRAM : ORIGIN = 0x0f000000, LENGTH = 0x1000
|
|
|
|
}
|
|
|
|
|
2002-03-28 15:09:10 +00:00
|
|
|
SECTIONS
|
|
|
|
{
|
2002-08-01 08:12:17 +00:00
|
|
|
.vectors :
|
2002-03-28 15:09:10 +00:00
|
|
|
{
|
2002-05-29 09:12:34 +00:00
|
|
|
*(.resetvectors);
|
2002-03-28 15:09:10 +00:00
|
|
|
*(.vectors);
|
|
|
|
. = ALIGN(0x200);
|
2002-05-02 14:05:51 +00:00
|
|
|
*(.init.text)
|
2002-08-01 08:12:17 +00:00
|
|
|
} > DRAM
|
2002-05-02 14:05:51 +00:00
|
|
|
|
|
|
|
.text :
|
|
|
|
{
|
2002-03-28 15:09:10 +00:00
|
|
|
*(.text)
|
2003-04-24 20:25:10 +00:00
|
|
|
. = ALIGN(0x4);
|
2002-08-01 08:12:17 +00:00
|
|
|
} > DRAM
|
2002-03-28 15:09:10 +00:00
|
|
|
|
2002-05-02 14:05:51 +00:00
|
|
|
.data :
|
|
|
|
{
|
|
|
|
*(.data)
|
2002-08-01 08:12:17 +00:00
|
|
|
} > DRAM
|
2002-05-02 14:05:51 +00:00
|
|
|
|
|
|
|
.rodata :
|
|
|
|
{
|
|
|
|
*(.rodata)
|
2002-09-08 17:05:28 +00:00
|
|
|
*(.rodata.str1.4)
|
2003-04-24 20:25:10 +00:00
|
|
|
. = ALIGN(0x4);
|
2002-08-01 08:12:17 +00:00
|
|
|
} > DRAM
|
2002-05-24 15:37:26 +00:00
|
|
|
|
|
|
|
.stack :
|
|
|
|
{
|
|
|
|
*(.stack)
|
2002-07-15 22:15:00 +00:00
|
|
|
_stackbegin = .;
|
2002-08-01 08:12:17 +00:00
|
|
|
/* We put the copy of the .iram section here to save space */
|
|
|
|
_iramcopy = .;
|
2002-09-03 09:44:08 +00:00
|
|
|
. += 0x2000;
|
|
|
|
_topramcopy = .;
|
|
|
|
. += 0x300;
|
2002-07-15 22:15:00 +00:00
|
|
|
_stackend = .;
|
2002-08-01 08:12:17 +00:00
|
|
|
} > DRAM
|
2002-05-24 15:37:26 +00:00
|
|
|
|
2002-08-01 08:58:17 +00:00
|
|
|
.bss :
|
|
|
|
{
|
|
|
|
_edata = .;
|
|
|
|
*(.bss)
|
|
|
|
*(COMMON)
|
|
|
|
_end = .;
|
|
|
|
} > DRAM
|
|
|
|
|
2003-02-26 16:05:30 +00:00
|
|
|
#ifdef DEBUG
|
|
|
|
.heap :
|
|
|
|
{
|
|
|
|
_poolstart = .;
|
|
|
|
. = 0x20000;
|
|
|
|
_poolend = .;
|
|
|
|
} > DRAM
|
|
|
|
#endif
|
|
|
|
|
2002-05-24 15:37:26 +00:00
|
|
|
.mp3buf :
|
|
|
|
{
|
|
|
|
_mp3buf = .;
|
2002-08-01 08:12:17 +00:00
|
|
|
} > DRAM
|
2002-05-24 15:37:26 +00:00
|
|
|
|
2003-02-26 16:45:10 +00:00
|
|
|
.mp3end ENDADDR - 0x300:
|
2002-05-24 15:37:26 +00:00
|
|
|
{
|
|
|
|
_mp3end = .;
|
2002-08-01 08:12:17 +00:00
|
|
|
} > DRAM
|
2002-03-28 15:09:10 +00:00
|
|
|
|
2002-09-03 09:44:08 +00:00
|
|
|
.topram : AT ( _topramcopy ) {
|
|
|
|
_topramstart = .;
|
|
|
|
*(.topcode)
|
|
|
|
_topramend = .;
|
|
|
|
} > DRAM
|
|
|
|
|
2002-08-01 08:58:17 +00:00
|
|
|
.iram 0xf000000 : AT ( _iramcopy )
|
2002-08-01 08:12:17 +00:00
|
|
|
{
|
|
|
|
_iramstart = .;
|
|
|
|
*(.icode)
|
|
|
|
*(.idata)
|
|
|
|
_iramend = .;
|
|
|
|
} > IRAM
|
2002-05-24 15:37:26 +00:00
|
|
|
}
|