diff options
Diffstat (limited to 'apps/plugins/plugin.lds')
| -rw-r--r-- | apps/plugins/plugin.lds | 17 |
1 files changed, 15 insertions, 2 deletions
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 |