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*)
|
2008-05-10 22:03:45 +00:00
|
|
|
*(.icode)
|
2008-03-13 03:48:23 +00:00
|
|
|
*(.glue_7)
|
|
|
|
*(.glue_7t)
|
|
|
|
. = ALIGN(0x4);
|
|
|
|
} > DRAM
|
|
|
|
|
|
|
|
.rodata :
|
|
|
|
{
|
|
|
|
*(.rodata) /* problems without this, dunno why */
|
|
|
|
*(.rodata*)
|
|
|
|
*(.rodata.str1.1)
|
|
|
|
*(.rodata.str1.4)
|
2008-05-10 22:03:45 +00:00
|
|
|
*(.irodata)
|
2008-03-13 03:48:23 +00:00
|
|
|
. = ALIGN(0x4);
|
|
|
|
|
|
|
|
/* Pseudo-allocate the copies of the data sections */
|
|
|
|
_datacopy = .;
|
|
|
|
} > DRAM
|
|
|
|
|
|
|
|
/* TRICK ALERT! For RAM execution, we put the .data section at the
|
|
|
|
same load address as the copy. Thus, we don't waste extra RAM
|
|
|
|
when we don't actually need the copy. */
|
|
|
|
.data : AT ( _datacopy )
|
|
|
|
{
|
|
|
|
_datastart = .;
|
|
|
|
*(.data*)
|
2008-05-10 22:03:45 +00:00
|
|
|
*(.idata)
|
2008-03-13 03:48:23 +00:00
|
|
|
. = ALIGN(0x4);
|
|
|
|
_dataend = .;
|
|
|
|
} > 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 = .;
|
2010-06-11 14:39:35 +00:00
|
|
|
*(.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 = .;
|
|
|
|
*(.init)
|
2011-01-08 20:42:51 +00:00
|
|
|
*(.initdata)
|
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*)
|
2008-05-10 22:03:45 +00:00
|
|
|
*(.ibss)
|
2008-03-13 03:48:23 +00:00
|
|
|
*(COMMON)
|
|
|
|
. = ALIGN(0x4);
|
2010-05-08 07:45:34 +00:00
|
|
|
} > DRAM
|
|
|
|
|
|
|
|
.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
|
|
|
|
|
2009-02-10 11:34:15 +00:00
|
|
|
.audiobuf (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
|
|
|
}
|
|
|
|
|