2008-03-13 03:48:23 +00:00
|
|
|
#include "config.h"
|
|
|
|
|
|
|
|
ENTRY(start)
|
|
|
|
|
|
|
|
OUTPUT_FORMAT(elf32-littlearm)
|
|
|
|
OUTPUT_ARCH(arm)
|
2008-04-29 06:19:32 +00:00
|
|
|
STARTUP(target/arm/s3c2440/crt0.o)
|
2008-03-13 03:48:23 +00:00
|
|
|
|
|
|
|
#define PLUGINSIZE PLUGIN_BUFFER_SIZE
|
|
|
|
#define CODECSIZE CODEC_SIZE
|
|
|
|
|
|
|
|
#ifdef DEBUG
|
|
|
|
#define STUBOFFSET 0x10000
|
|
|
|
#else
|
|
|
|
#define STUBOFFSET 0
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include "cpu.h"
|
2008-04-22 04:34:25 +00:00
|
|
|
#define DRAMSIZE (MEMORYSIZE * 0x100000) - STUBOFFSET - PLUGINSIZE - CODECSIZE - LCD_BUFFER_SIZE - TTB_SIZE
|
2008-03-13 03:48:23 +00:00
|
|
|
|
2008-04-22 04:34:25 +00:00
|
|
|
#define DRAMORIG 0x00000000 + STUBOFFSET
|
2008-03-13 03:48:23 +00:00
|
|
|
|
|
|
|
/* End of the audio buffer, where the codec buffer starts */
|
|
|
|
#define ENDAUDIOADDR (DRAMORIG + DRAMSIZE)
|
|
|
|
|
|
|
|
/* Where the codec buffer ends, and the plugin buffer starts */
|
|
|
|
#define ENDADDR (ENDAUDIOADDR + CODECSIZE)
|
|
|
|
|
|
|
|
MEMORY
|
|
|
|
{
|
|
|
|
DRAM : ORIGIN = DRAMORIG, LENGTH = DRAMSIZE
|
|
|
|
}
|
|
|
|
|
|
|
|
SECTIONS
|
|
|
|
{
|
2008-05-02 03:27:17 +00:00
|
|
|
/* This nice little hack is to trick ROLO into loading in a certain place
|
|
|
|
* CRT0.s takes care of making sure the code is where it needs to be
|
|
|
|
*/
|
|
|
|
loadaddress = 0x31000000;
|
|
|
|
|
2008-04-22 04:34:25 +00:00
|
|
|
.vectors DRAMORIG :
|
2008-03-13 03:48:23 +00:00
|
|
|
{
|
2008-04-22 04:34:25 +00:00
|
|
|
_vectorstart = .;
|
|
|
|
*(.vectors*);
|
2008-03-13 03:48:23 +00:00
|
|
|
*(.init.text)
|
2008-04-22 04:34:25 +00:00
|
|
|
. = ALIGN(0x4);
|
|
|
|
} > DRAM
|
|
|
|
|
|
|
|
.text :
|
|
|
|
{
|
|
|
|
_textstart = .;
|
|
|
|
*(.text)
|
2008-03-13 03:48:23 +00:00
|
|
|
*(.text*)
|
|
|
|
*(.glue_7)
|
|
|
|
*(.glue_7t)
|
|
|
|
. = ALIGN(0x4);
|
|
|
|
} > DRAM
|
|
|
|
|
2008-04-22 04:34:25 +00:00
|
|
|
_textcopy = LOADADDR(.text);
|
|
|
|
|
2008-03-13 03:48:23 +00:00
|
|
|
.rodata :
|
|
|
|
{
|
|
|
|
*(.rodata) /* problems without this, dunno why */
|
|
|
|
*(.rodata*)
|
|
|
|
*(.rodata.str1.1)
|
|
|
|
*(.rodata.str1.4)
|
|
|
|
. = ALIGN(0x4);
|
|
|
|
} > DRAM
|
|
|
|
|
2008-04-22 04:34:25 +00:00
|
|
|
.data :
|
2008-03-13 03:48:23 +00:00
|
|
|
{
|
|
|
|
*(.data*)
|
|
|
|
. = ALIGN(0x4);
|
|
|
|
} > DRAM
|
|
|
|
|
|
|
|
/DISCARD/ :
|
|
|
|
{
|
|
|
|
*(.eh_frame)
|
2008-04-22 04:34:25 +00:00
|
|
|
}
|
2008-03-13 03:48:23 +00:00
|
|
|
|
|
|
|
.iram :
|
|
|
|
{
|
|
|
|
_iramstart = .;
|
|
|
|
*(.icode)
|
|
|
|
*(.irodata)
|
|
|
|
*(.idata)
|
2008-04-07 18:24:23 +00:00
|
|
|
. = ALIGN(0x4);
|
2008-03-13 03:48:23 +00:00
|
|
|
_iramend = .;
|
|
|
|
} > DRAM
|
|
|
|
|
|
|
|
_iramcopy = LOADADDR(.iram);
|
|
|
|
|
2008-04-22 04:34:25 +00:00
|
|
|
.ibss :
|
2008-03-13 03:48:23 +00:00
|
|
|
{
|
|
|
|
_iedata = .;
|
|
|
|
*(.ibss)
|
|
|
|
. = ALIGN(0x4);
|
|
|
|
_iend = .;
|
|
|
|
} > DRAM
|
|
|
|
|
|
|
|
.stack :
|
|
|
|
{
|
|
|
|
*(.stack)
|
|
|
|
stackbegin = .;
|
|
|
|
. += 0x2000;
|
|
|
|
stackend = .;
|
|
|
|
} > DRAM
|
|
|
|
|
|
|
|
.bss :
|
|
|
|
{
|
|
|
|
_edata = .;
|
|
|
|
*(.bss*)
|
|
|
|
*(COMMON)
|
|
|
|
. = ALIGN(0x4);
|
|
|
|
_end = .;
|
|
|
|
} > DRAM
|
|
|
|
|
|
|
|
.audiobuf ALIGN(4) :
|
|
|
|
{
|
|
|
|
_audiobuffer = .;
|
|
|
|
audiobuffer = .;
|
|
|
|
} > DRAM
|
|
|
|
|
|
|
|
.audiobufend ENDAUDIOADDR:
|
|
|
|
{
|
|
|
|
audiobufend = .;
|
|
|
|
_audiobufend = .;
|
|
|
|
} > DRAM
|
|
|
|
|
|
|
|
.codec ENDAUDIOADDR:
|
|
|
|
{
|
|
|
|
codecbuf = .;
|
|
|
|
_codecbuf = .;
|
|
|
|
}
|
|
|
|
|
|
|
|
.plugin ENDADDR:
|
|
|
|
{
|
|
|
|
_pluginbuf = .;
|
|
|
|
pluginbuf = .;
|
|
|
|
}
|
|
|
|
}
|