5 OUTPUT_FORMAT(elf32-sh)
6 STARTUP(target/sh/crt0.o)
8 #define PLUGINSIZE PLUGIN_BUFFER_SIZE
9 #define CODECSIZE CODEC_SIZE
12 #define STUBOFFSET 0x10000
17 #define DRAMSIZE (MEMORYSIZE * 0x100000) - PLUGINSIZE - STUBOFFSET - CODECSIZE
19 #define DRAMORIG 0x09000000 + STUBOFFSET
20 #define IRAMORIG 0x0f000000
21 #define IRAMSIZE 0x1000
23 /* End of the audio buffer, where the codec buffer starts */
24 #define ENDAUDIOADDR (DRAMORIG + DRAMSIZE)
26 /* Where the codec buffer ends, and the plugin buffer starts */
27 #define ENDADDR (ENDAUDIOADDR + CODECSIZE)
31 DRAM : ORIGIN = DRAMORIG, LENGTH = DRAMSIZE
32 IRAM : ORIGIN = IRAMORIG, LENGTH = IRAMSIZE
41 KEEP(*(.resetvectors));
57 *(.rodata) /* problems without this, dunno why */
63 /* Pseudo-allocate the copies of the data sections */
67 /* TRICK ALERT! For RAM execution, we put the .data section at the
68 same load address as the copy. Thus, we don't waste extra RAM
69 when we don't actually need the copy. */
70 .data : AT ( _datacopy )
92 _iramcopy = LOADADDR(.iram);
93 _noloaddram = LOADADDR(.iram);
103 .stack _noloaddram (NOLOAD) :
127 .audiobufend ENDAUDIOADDR (NOLOAD) :
133 .codec ENDAUDIOADDR (NOLOAD) :
139 .plugin ENDADDR (NOLOAD) :