1
0
Fork 0
forked from len0rd/rockbox

Split up app.lds to the respective target directories. The portalplayer devices replicate app.lds since their target tree doesn't follow a syntax typical to the newer arm targets - the portalplayers could be cleaned up further. boot.lds and plugin.lds still need to be cleaned up.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16651 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Karl Kurbjun 2008-03-13 03:48:23 +00:00
parent 2b5f9aec64
commit ef62d6891a
14 changed files with 1841 additions and 576 deletions

View file

@ -0,0 +1,170 @@
#include "config.h"
ENTRY(start)
OUTPUT_FORMAT(elf32-littlearm)
OUTPUT_ARCH(arm)
INPUT(target/arm/tcc780x/crt0.o)
#define PLUGINSIZE PLUGIN_BUFFER_SIZE
#define CODECSIZE CODEC_SIZE
#ifdef DEBUG
#define STUBOFFSET 0x10000
#else
#define STUBOFFSET 0
#endif
#define DRAMSIZE (MEMORYSIZE * 0x100000) - PLUGINSIZE - STUBOFFSET - CODECSIZE
#define DRAMORIG 0x20000000 + STUBOFFSET
#define ITCMORIG 0x00000000
#define ITCMSIZE 0x1000
#define DTCMORIG 0xA0000000
#define DTCMSIZE 0x2000
#define SRAMORIG 0x10000000
#define SRAMSIZE 0xc000
/* 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
/* Seperate data & instruction TCMs plus SRAM. */
ITCM : ORIGIN = ITCMORIG, LENGTH = ITCMSIZE
DTCM : ORIGIN = DTCMORIG, LENGTH = DTCMSIZE
SRAM : ORIGIN = SRAMORIG, LENGTH = SRAMSIZE
}
SECTIONS
{
.text :
{
loadaddress = .;
_loadaddress = .;
. = ALIGN(0x200);
*(.init.text)
*(.text*)
*(.glue_7)
*(.glue_7t)
. = ALIGN(0x4);
} > DRAM
.rodata :
{
*(.rodata) /* problems without this, dunno why */
*(.rodata*)
*(.rodata.str1.1)
*(.rodata.str1.4)
. = 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*)
. = ALIGN(0x4);
_dataend = .;
} > DRAM
/DISCARD/ :
{
*(.eh_frame)
}
.vectors ITCMORIG :
{
_vectorsstart = .;
*(.vectors);
_vectorsend = .;
} > ITCM AT> DRAM
_vectorscopy = LOADADDR(.vectors);
.itcm :
{
_itcmstart = .;
_itcmend = .;
} > ITCM AT> DRAM
_itcmcopy = LOADADDR(.itcm);
.dtcm :
{
_dtcmstart = .;
_dtcmend = .;
} > DTCM AT> DRAM
_dtcmcopy = LOADADDR(.dtcm);
.iram :
{
_iramstart = .;
*(.irodata)
*(.idata)
*(.icode)
. = ALIGN(0x4);
_iramend = .;
} > SRAM AT> DRAM
_iramcopy = LOADADDR(.iram);
.ibss (NOLOAD) :
{
_iedata = .;
*(.ibss)
. = ALIGN(0x4);
_iend = .;
} > SRAM
.stack :
{
*(.stack)
stackbegin = .;
. += 0x2000;
stackend = .;
} > SRAM
.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 = .;
}
}