2005-02-04 08:34:20 +00:00
|
|
|
#include "config.h"
|
|
|
|
|
|
|
|
/* These output formats should be in the config-files */
|
|
|
|
|
2005-07-18 12:40:29 +00:00
|
|
|
#ifdef CPU_COLDFIRE
|
2005-02-04 08:34:20 +00:00
|
|
|
OUTPUT_FORMAT(elf32-m68k)
|
2006-01-12 00:35:50 +00:00
|
|
|
#elif defined(CPU_ARM)
|
2005-11-12 16:01:15 +00:00
|
|
|
OUTPUT_FORMAT(elf32-littlearm)
|
2005-02-04 08:34:20 +00:00
|
|
|
#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
|
|
|
|
|
2005-07-08 15:08:59 +00:00
|
|
|
#if defined(IRIVER_H100_SERIES) || defined(IRIVER_H300)
|
2005-06-29 13:12:45 +00:00
|
|
|
#define ARCH_IRIVER
|
|
|
|
#endif
|
|
|
|
|
2006-02-05 19:27:23 +00:00
|
|
|
#if (CONFIG_CPU==PP5002) || (CONFIG_CPU==PP5020)
|
2005-11-12 16:01:15 +00:00
|
|
|
#define ARCH_IPOD
|
|
|
|
#endif
|
|
|
|
|
2005-07-09 07:46:42 +00:00
|
|
|
#ifdef ARCH_IRIVER
|
2005-04-20 18:54:20 +00:00
|
|
|
#define DRAMORIG 0x31000000
|
2005-09-01 20:57:33 +00:00
|
|
|
#define IRAMORIG 0x1000c000
|
|
|
|
#define IRAMSIZE 0xc000
|
2006-03-21 12:25:40 +00:00
|
|
|
#elif defined(IAUDIO_X5)
|
|
|
|
#define DRAMORIG 0x31000000
|
2006-04-11 10:37:37 +00:00
|
|
|
#define IRAMORIG 0x10014000
|
2006-03-21 12:25:40 +00:00
|
|
|
#define IRAMSIZE 0xc000
|
2005-11-12 16:01:15 +00:00
|
|
|
#elif defined(ARCH_IPOD)
|
2006-01-16 12:57:46 +00:00
|
|
|
#define DRAMORIG 0x00000000
|
2005-11-12 16:01:15 +00:00
|
|
|
#define IRAMORIG 0x4000c000
|
|
|
|
#define IRAMSIZE 0xc000
|
2006-01-12 00:35:50 +00:00
|
|
|
#elif CONFIG_CPU == PNX0101
|
2006-02-12 23:16:05 +00:00
|
|
|
#define DRAMORIG 0xc00000 + STUBOFFSET
|
2006-01-12 00:35:50 +00:00
|
|
|
#define IRAMORIG 0x408000
|
|
|
|
#define IRAMSIZE 0x8000
|
2005-02-04 12:25:18 +00:00
|
|
|
#else
|
|
|
|
#define DRAMORIG 0x09000000 + STUBOFFSET
|
|
|
|
#endif
|
|
|
|
|
2005-06-27 21:23:03 +00:00
|
|
|
#define PLUGIN_LENGTH PLUGIN_BUFFER_SIZE
|
2005-06-28 21:12:11 +00:00
|
|
|
#define DRAMSIZE (MEMORYSIZE * 0x100000) - PLUGIN_LENGTH - CODEC_SIZE
|
|
|
|
#define CODEC_ORIGIN (DRAMORIG + (DRAMSIZE))
|
|
|
|
#define PLUGIN_ORIGIN (CODEC_ORIGIN + CODEC_SIZE)
|
|
|
|
|
2005-06-22 02:47:54 +00:00
|
|
|
|
2005-06-27 21:23:03 +00:00
|
|
|
#ifdef CODEC
|
2005-06-22 02:47:54 +00:00
|
|
|
#define THIS_LENGTH CODEC_SIZE
|
2005-06-28 21:12:11 +00:00
|
|
|
#define THIS_ORIGIN CODEC_ORIGIN
|
2005-06-22 02:47:54 +00:00
|
|
|
#else
|
|
|
|
#define THIS_LENGTH PLUGIN_LENGTH
|
2005-06-28 21:12:11 +00:00
|
|
|
#define THIS_ORIGIN PLUGIN_ORIGIN
|
2005-06-22 02:47:54 +00:00
|
|
|
#endif
|
|
|
|
|
2003-06-29 16:33:04 +00:00
|
|
|
MEMORY
|
|
|
|
{
|
2005-06-28 21:12:11 +00:00
|
|
|
PLUGIN_RAM : ORIGIN = THIS_ORIGIN, LENGTH = THIS_LENGTH
|
2006-03-21 12:25:40 +00:00
|
|
|
#if defined(IRAMSIZE)
|
2005-02-22 00:42:22 +00:00
|
|
|
PLUGIN_IRAM : ORIGIN = IRAMORIG, LENGTH = IRAMSIZE
|
|
|
|
#endif
|
2003-06-29 16:33:04 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
SECTIONS
|
|
|
|
{
|
2006-01-15 18:20:18 +00:00
|
|
|
.header : {
|
|
|
|
_plugin_start_addr = .;
|
|
|
|
plugin_start_addr = .;
|
|
|
|
KEEP(*(.header))
|
|
|
|
} > PLUGIN_RAM
|
|
|
|
|
|
|
|
.text :
|
2006-01-08 22:50:14 +00:00
|
|
|
{
|
2005-06-29 21:04:22 +00:00
|
|
|
*(.text*)
|
2006-02-24 20:54:09 +00:00
|
|
|
#if (CONFIG_CPU==PP5020) || (CONFIG_CPU==PNX0101) || (CONFIG_CPU==PP5002)
|
2005-11-12 16:01:15 +00:00
|
|
|
*(.glue_7)
|
|
|
|
*(.glue_7t)
|
|
|
|
#endif
|
2003-06-29 16:33:04 +00:00
|
|
|
} > PLUGIN_RAM
|
|
|
|
|
2006-01-08 22:50:14 +00:00
|
|
|
.rodata :
|
|
|
|
{
|
2005-06-29 21:04:22 +00:00
|
|
|
*(.rodata*)
|
2003-08-04 19:13:42 +00:00
|
|
|
. = ALIGN(0x4);
|
2006-01-08 22:50:14 +00:00
|
|
|
} > PLUGIN_RAM
|
|
|
|
|
2006-01-15 18:20:18 +00:00
|
|
|
.data :
|
2006-01-08 22:50:14 +00:00
|
|
|
{
|
|
|
|
*(.data*)
|
2006-03-21 12:25:40 +00:00
|
|
|
#if defined(IRAMSIZE)
|
2005-02-22 00:42:22 +00:00
|
|
|
iramcopy = .;
|
|
|
|
#endif
|
2003-06-29 16:33:04 +00:00
|
|
|
} > PLUGIN_RAM
|
2005-02-22 00:42:22 +00:00
|
|
|
|
2006-01-08 22:50:14 +00:00
|
|
|
/DISCARD/ :
|
|
|
|
{
|
|
|
|
*(.eh_frame)
|
|
|
|
}
|
|
|
|
|
2006-03-21 12:25:40 +00:00
|
|
|
#if defined(IRAMSIZE)
|
2005-02-22 00:42:22 +00:00
|
|
|
.iram IRAMORIG : AT ( iramcopy)
|
|
|
|
{
|
|
|
|
iramstart = .;
|
|
|
|
*(.icode)
|
2005-10-19 19:35:24 +00:00
|
|
|
*(.irodata)
|
2005-02-22 00:42:22 +00:00
|
|
|
*(.idata)
|
|
|
|
iramend = .;
|
|
|
|
} > PLUGIN_IRAM
|
2006-01-08 22:50:14 +00:00
|
|
|
|
|
|
|
.ibss (NOLOAD) :
|
|
|
|
{
|
|
|
|
iedata = .;
|
|
|
|
*(.ibss)
|
|
|
|
. = ALIGN(0x4);
|
|
|
|
iend = .;
|
|
|
|
} > PLUGIN_IRAM
|
|
|
|
|
|
|
|
.bss ADDR(.data) + SIZEOF(.data) + SIZEOF(.iram):
|
|
|
|
#else
|
|
|
|
.bss :
|
2005-02-22 00:42:22 +00:00
|
|
|
#endif
|
2006-01-08 22:50:14 +00:00
|
|
|
{
|
|
|
|
*(.bss*)
|
2006-01-08 23:45:29 +00:00
|
|
|
*(COMMON)
|
2006-01-15 18:20:18 +00:00
|
|
|
. = ALIGN(0x4);
|
|
|
|
_plugin_end_addr = .;
|
|
|
|
plugin_end_addr = .;
|
2006-01-08 22:50:14 +00:00
|
|
|
} > PLUGIN_RAM
|
|
|
|
|
2005-06-29 21:04:22 +00:00
|
|
|
/* Special trick to avoid a linker error when no other sections are
|
|
|
|
left after garbage collection (plugin not for this platform) */
|
2006-01-08 22:50:14 +00:00
|
|
|
.comment 0 :
|
|
|
|
{
|
2005-06-29 21:04:22 +00:00
|
|
|
KEEP(*(.comment))
|
|
|
|
}
|
2003-06-29 16:33:04 +00:00
|
|
|
}
|