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/imx31/crt0.o)
|
2008-03-13 03:48:23 +00:00
|
|
|
|
|
|
|
#define PLUGINSIZE PLUGIN_BUFFER_SIZE
|
|
|
|
#define CODECSIZE CODEC_SIZE
|
|
|
|
|
|
|
|
#include "imx31l.h"
|
|
|
|
/* Subtract 1MB for the FRAME/TTB section */
|
2010-09-20 17:09:55 +00:00
|
|
|
#define DRAMSIZE ((MEMORYSIZE * 0x100000) - CODECSIZE - \
|
2010-05-08 07:45:34 +00:00
|
|
|
PLUGINSIZE - QHARRAY_SIZE - FRAME_SIZE - TTB_SIZE)
|
2008-03-13 03:48:23 +00:00
|
|
|
|
2010-09-20 17:09:55 +00:00
|
|
|
#define DRAMORIG 0x0
|
2008-03-13 03:48:23 +00:00
|
|
|
/* #define IRAMORIG 0x1FFFC000 */
|
|
|
|
#define IRAMORIG DRAMORIG
|
|
|
|
#define IRAM DRAM
|
2008-04-18 16:42:50 +00:00
|
|
|
#define IRAMSIZE IRAM_SIZE
|
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)
|
|
|
|
|
2010-06-11 14:39:35 +00:00
|
|
|
/* INIT section is the codec buffer */
|
|
|
|
#define INITSIZE CODECSIZE
|
|
|
|
#define INITSTART ENDAUDIOADDR
|
|
|
|
|
2008-03-13 03:48:23 +00:00
|
|
|
MEMORY
|
|
|
|
{
|
|
|
|
DRAM : ORIGIN = DRAMORIG, LENGTH = DRAMSIZE
|
2010-06-11 14:39:35 +00:00
|
|
|
INIT : ORIGIN = INITSTART, LENGTH = INITSIZE
|
2010-05-08 07:45:34 +00:00
|
|
|
QHARRAY : ORIGIN = QHARRAY_PHYS_ADDR, LENGTH = QHARRAY_SIZE
|
2008-03-13 03:48:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
SECTIONS
|
|
|
|
{
|
|
|
|
.text :
|
|
|
|
{
|
|
|
|
loadaddress = .;
|
|
|
|
_loadaddress = .;
|
|
|
|
. = ALIGN(0x200);
|
|
|
|
*(.init.text)
|
|
|
|
*(.text*)
|
2011-12-17 01:43:32 +00:00
|
|
|
*(.icode*)
|
2008-03-13 03:48:23 +00:00
|
|
|
*(.glue_7)
|
|
|
|
*(.glue_7t)
|
|
|
|
. = ALIGN(0x4);
|
|
|
|
} > DRAM
|
|
|
|
|
|
|
|
.rodata :
|
|
|
|
{
|
|
|
|
*(.rodata*)
|
2011-12-17 01:43:32 +00:00
|
|
|
*(.irodata*)
|
2008-03-13 03:48:23 +00:00
|
|
|
. = ALIGN(0x4);
|
|
|
|
} > DRAM
|
|
|
|
|
2011-11-22 17:34:01 +00:00
|
|
|
.data :
|
2008-03-13 03:48:23 +00:00
|
|
|
{
|
|
|
|
*(.data*)
|
2011-12-17 01:43:32 +00:00
|
|
|
*(.idata*)
|
2008-03-13 03:48:23 +00:00
|
|
|
. = ALIGN(0x4);
|
|
|
|
} > DRAM
|
|
|
|
|
2010-05-08 07:45:34 +00:00
|
|
|
#if 0 /* Unneeded at the moment */
|
|
|
|
/* .ncdata section is placed at uncached physical alias address and is
|
|
|
|
* loaded at the proper cached virtual address - no copying is
|
|
|
|
* performed in the init code */
|
|
|
|
.ncdata . + NOCACHE_BASE :
|
|
|
|
{
|
|
|
|
. = ALIGN(CACHEALIGN_SIZE); /* >= Cache line boundary */
|
|
|
|
*(.ncdata*)
|
|
|
|
. = ALIGN(CACHEALIGN_SIZE); /* >= Cache line boundary */
|
|
|
|
} AT> DRAM
|
|
|
|
#endif
|
2008-03-13 03:48:23 +00:00
|
|
|
/DISCARD/ :
|
|
|
|
{
|
|
|
|
*(.eh_frame)
|
|
|
|
}
|
|
|
|
|
2010-06-30 05:49:56 +00:00
|
|
|
/* NOLOAD sections at end start here. Any part of the binary image past
|
|
|
|
* this point is discarded or copied elsewhere. */
|
|
|
|
_noloaddram = .;
|
|
|
|
|
2008-03-13 03:48:23 +00:00
|
|
|
.vectors 0x0 :
|
|
|
|
{
|
|
|
|
_vectorsstart = .;
|
2011-12-18 06:43:08 +00:00
|
|
|
KEEP(*(.vectors))
|
2008-03-13 03:48:23 +00:00
|
|
|
_vectorsend = .;
|
|
|
|
} AT> DRAM
|
|
|
|
|
|
|
|
_vectorscopy = LOADADDR(.vectors);
|
2009-02-10 11:34:15 +00:00
|
|
|
|
2010-06-11 14:39:35 +00:00
|
|
|
.init :
|
|
|
|
{
|
|
|
|
. = ALIGN(4);
|
|
|
|
_initstart = .;
|
2011-12-17 01:43:32 +00:00
|
|
|
*(.init*)
|
2010-06-11 14:39:35 +00:00
|
|
|
_initend = .;
|
|
|
|
} > INIT AT> DRAM
|
|
|
|
|
|
|
|
_initcopy = LOADADDR(.init);
|
|
|
|
|
2010-06-30 05:49:56 +00:00
|
|
|
.stack _noloaddram (NOLOAD) :
|
2008-03-13 03:48:23 +00:00
|
|
|
{
|
2010-06-11 14:39:35 +00:00
|
|
|
. = ALIGN(4);
|
|
|
|
*(.stack)
|
|
|
|
stackbegin = .;
|
|
|
|
. += 0x2000;
|
|
|
|
stackend = .;
|
2008-03-13 03:48:23 +00:00
|
|
|
} > DRAM
|
2009-02-10 11:34:15 +00:00
|
|
|
|
|
|
|
.bss (NOLOAD) :
|
2008-03-13 03:48:23 +00:00
|
|
|
{
|
2010-06-11 14:39:35 +00:00
|
|
|
_edata = .;
|
2008-03-13 03:48:23 +00:00
|
|
|
*(.bss*)
|
2011-12-17 01:43:32 +00:00
|
|
|
*(.ibss*)
|
2008-03-13 03:48:23 +00:00
|
|
|
*(COMMON)
|
|
|
|
. = ALIGN(0x4);
|
2010-05-08 07:45:34 +00:00
|
|
|
} > DRAM
|
2020-07-03 21:39:39 +00:00
|
|
|
|
2010-05-08 07:45:34 +00:00
|
|
|
.ncbss . + NOCACHE_BASE (NOLOAD) :
|
|
|
|
{
|
|
|
|
. = ALIGN(CACHEALIGN_SIZE); /* >= Cache line boundary */
|
|
|
|
*(.ncbss*)
|
|
|
|
. = ALIGN(CACHEALIGN_SIZE); /* >= Cache line boundary */
|
|
|
|
} AT> DRAM
|
|
|
|
|
|
|
|
.endaddr . - NOCACHE_BASE (NOLOAD) :
|
|
|
|
{
|
|
|
|
_end = .;
|
2008-03-13 03:48:23 +00:00
|
|
|
} > DRAM
|
|
|
|
|
2020-07-03 21:39:39 +00:00
|
|
|
.audiobuf _end (NOLOAD) :
|
2008-03-13 03:48:23 +00:00
|
|
|
{
|
|
|
|
_audiobuffer = .;
|
|
|
|
audiobuffer = .;
|
|
|
|
} > DRAM
|
|
|
|
|
2009-02-10 11:34:15 +00:00
|
|
|
.audiobufend ENDAUDIOADDR (NOLOAD) :
|
2008-03-13 03:48:23 +00:00
|
|
|
{
|
|
|
|
audiobufend = .;
|
|
|
|
_audiobufend = .;
|
|
|
|
} > DRAM
|
|
|
|
|
2009-02-10 11:34:15 +00:00
|
|
|
.codec ENDAUDIOADDR (NOLOAD) :
|
2008-03-13 03:48:23 +00:00
|
|
|
{
|
|
|
|
codecbuf = .;
|
|
|
|
_codecbuf = .;
|
|
|
|
}
|
|
|
|
|
2009-02-10 11:34:15 +00:00
|
|
|
.plugin ENDADDR (NOLOAD) :
|
2008-03-13 03:48:23 +00:00
|
|
|
{
|
|
|
|
_pluginbuf = .;
|
|
|
|
pluginbuf = .;
|
|
|
|
}
|
2008-04-18 16:42:50 +00:00
|
|
|
|
2010-05-08 07:45:34 +00:00
|
|
|
.qharray (NOLOAD) :
|
2008-04-18 16:42:50 +00:00
|
|
|
{
|
2010-05-08 07:45:34 +00:00
|
|
|
_qharray = .;
|
|
|
|
*(.qharray)
|
|
|
|
_qharrayend = .;
|
|
|
|
} > QHARRAY
|
2008-03-13 03:48:23 +00:00
|
|
|
}
|
|
|
|
|