2005-02-04 08:34:20 +00:00
|
|
|
#include "config.h"
|
|
|
|
|
|
|
|
/* These output formats should be in the config-files */
|
|
|
|
|
|
|
|
#if CONFIG_CPU == MCF5249
|
|
|
|
OUTPUT_FORMAT(elf32-m68k)
|
|
|
|
#else
|
2003-06-29 16:33:04 +00:00
|
|
|
OUTPUT_FORMAT(elf32-sh)
|
2005-02-04 08:34:20 +00:00
|
|
|
#endif
|
2003-06-29 16:33:04 +00:00
|
|
|
|
2005-02-04 12:25:18 +00:00
|
|
|
#ifdef DEBUG
|
|
|
|
#define STUBOFFSET 0x10000
|
|
|
|
#else
|
|
|
|
#define STUBOFFSET 0
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef IRIVER_H100
|
2005-04-20 18:54:20 +00:00
|
|
|
#define DRAMORIG 0x31000000
|
2005-02-22 00:42:22 +00:00
|
|
|
#define IRAMORIG 0x10010000
|
|
|
|
#define IRAMSIZE 0x8000
|
2005-02-04 12:25:18 +00:00
|
|
|
#else
|
|
|
|
#define DRAMORIG 0x09000000 + STUBOFFSET
|
|
|
|
#endif
|
|
|
|
|
2005-06-22 02:47:54 +00:00
|
|
|
#ifdef CODEC
|
2005-06-22 21:34:11 +00:00
|
|
|
#define CODEC_SIZE 0x40000
|
2005-06-22 02:47:54 +00:00
|
|
|
#else
|
|
|
|
#define CODEC_SIZE 0
|
|
|
|
#endif
|
|
|
|
|
2005-02-15 14:00:37 +00:00
|
|
|
#if MEMORYSIZE >= 32
|
|
|
|
#define PLUGIN_LENGTH 0xC0000
|
|
|
|
#else
|
2003-07-13 22:15:19 +00:00
|
|
|
#define PLUGIN_LENGTH 0x8000
|
2005-02-15 14:00:37 +00:00
|
|
|
#endif
|
2005-06-22 02:47:54 +00:00
|
|
|
|
|
|
|
#if CODEC_SIZE > 0
|
|
|
|
#define THIS_LENGTH CODEC_SIZE
|
|
|
|
#else
|
|
|
|
#define THIS_LENGTH PLUGIN_LENGTH
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#define DRAMSIZE (MEMORYSIZE * 0x100000) - PLUGIN_LENGTH - CODEC_SIZE
|
2005-02-04 12:25:18 +00:00
|
|
|
#define PLUGIN_ORIGIN (DRAMORIG + (DRAMSIZE))
|
2003-07-13 22:15:19 +00:00
|
|
|
|
2003-06-29 16:33:04 +00:00
|
|
|
MEMORY
|
|
|
|
{
|
2005-06-22 02:47:54 +00:00
|
|
|
PLUGIN_RAM : ORIGIN = PLUGIN_ORIGIN, LENGTH = THIS_LENGTH
|
2005-02-22 00:42:22 +00:00
|
|
|
#ifdef IRIVER_H100
|
|
|
|
PLUGIN_IRAM : ORIGIN = IRAMORIG, LENGTH = IRAMSIZE
|
|
|
|
#endif
|
2003-06-29 16:33:04 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
SECTIONS
|
|
|
|
{
|
|
|
|
.text : {
|
|
|
|
*(.entry)
|
|
|
|
*(.text)
|
|
|
|
} > PLUGIN_RAM
|
|
|
|
|
|
|
|
.data : {
|
|
|
|
*(.data)
|
|
|
|
} > PLUGIN_RAM
|
|
|
|
|
2005-02-15 22:25:53 +00:00
|
|
|
/DISCARD/ : {
|
|
|
|
*(.eh_frame)
|
|
|
|
}
|
|
|
|
|
2003-06-29 16:33:04 +00:00
|
|
|
.bss : {
|
|
|
|
*(.bss)
|
|
|
|
} > PLUGIN_RAM
|
|
|
|
|
|
|
|
.rodata : {
|
|
|
|
*(.rodata)
|
2005-02-04 12:40:47 +00:00
|
|
|
*(.rodata.str1.1)
|
2003-07-06 09:26:45 +00:00
|
|
|
*(.rodata.str1.4)
|
2003-08-04 19:13:42 +00:00
|
|
|
. = ALIGN(0x4);
|
2005-02-22 00:42:22 +00:00
|
|
|
#ifdef IRIVER_H100
|
|
|
|
iramcopy = .;
|
|
|
|
#endif
|
2003-06-29 16:33:04 +00:00
|
|
|
} > PLUGIN_RAM
|
2005-02-22 00:42:22 +00:00
|
|
|
|
|
|
|
#ifdef IRIVER_H100
|
|
|
|
.iram IRAMORIG : AT ( iramcopy)
|
|
|
|
{
|
|
|
|
iramstart = .;
|
|
|
|
*(.icode)
|
|
|
|
*(.idata)
|
|
|
|
iramend = .;
|
|
|
|
} > PLUGIN_IRAM
|
|
|
|
#endif
|
2003-06-29 16:33:04 +00:00
|
|
|
}
|