From ecf2f747edae9ffc3eb0057958da41915cbfac19 Mon Sep 17 00:00:00 2001 From: Linus Nielsen Feltzing Date: Wed, 22 Jun 2005 02:47:54 +0000 Subject: Daniel's fix that loads codecs in their own memory space git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6794 a1c6a512-1295-4272-9138-f99709370657 --- apps/plugins/plugin.lds | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'apps/plugins/plugin.lds') diff --git a/apps/plugins/plugin.lds b/apps/plugins/plugin.lds index 3b9ac8a..619bb0e 100644 --- a/apps/plugins/plugin.lds +++ b/apps/plugins/plugin.lds @@ -22,17 +22,30 @@ OUTPUT_FORMAT(elf32-sh) #define DRAMORIG 0x09000000 + STUBOFFSET #endif +#ifdef CODEC +#define CODEC_SIZE 0x3C000 +#else +#define CODEC_SIZE 0 +#endif + #if MEMORYSIZE >= 32 #define PLUGIN_LENGTH 0xC0000 #else #define PLUGIN_LENGTH 0x8000 #endif -#define DRAMSIZE (MEMORYSIZE * 0x100000) - PLUGIN_LENGTH + +#if CODEC_SIZE > 0 +#define THIS_LENGTH CODEC_SIZE +#else +#define THIS_LENGTH PLUGIN_LENGTH +#endif + +#define DRAMSIZE (MEMORYSIZE * 0x100000) - PLUGIN_LENGTH - CODEC_SIZE #define PLUGIN_ORIGIN (DRAMORIG + (DRAMSIZE)) MEMORY { - PLUGIN_RAM : ORIGIN = PLUGIN_ORIGIN, LENGTH = PLUGIN_LENGTH + PLUGIN_RAM : ORIGIN = PLUGIN_ORIGIN, LENGTH = THIS_LENGTH #ifdef IRIVER_H100 PLUGIN_IRAM : ORIGIN = IRAMORIG, LENGTH = IRAMSIZE #endif -- cgit v1.1