summaryrefslogtreecommitdiff
path: root/apps/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins')
-rw-r--r--apps/plugins/plugin.lds48
-rw-r--r--apps/plugins/rockboy/cpu.c2
-rw-r--r--apps/plugins/rockboy/lcd.c2
-rw-r--r--apps/plugins/rockboy/rockboy.c3
4 files changed, 37 insertions, 18 deletions
diff --git a/apps/plugins/plugin.lds b/apps/plugins/plugin.lds
index 83825b9035..fc9d4d4efe 100644
--- a/apps/plugins/plugin.lds
+++ b/apps/plugins/plugin.lds
@@ -60,7 +60,8 @@ MEMORY
SECTIONS
{
- .text : {
+ .text :
+ {
KEEP(*(.entry))
*(.text*)
#if CONFIG_CPU==PP5020
@@ -69,26 +70,25 @@ SECTIONS
#endif
} > PLUGIN_RAM
- .data : {
- *(.data*)
- } > PLUGIN_RAM
-
- /DISCARD/ : {
- *(.eh_frame)
- }
-
- .bss : {
- *(.bss*)
- } > PLUGIN_RAM
-
- .rodata : {
+ .rodata :
+ {
*(.rodata*)
. = ALIGN(0x4);
+ } > PLUGIN_RAM
+
+ .data :
+ {
+ *(.data*)
#if defined(ARCH_IRIVER) || defined(ARCH_IPOD)
iramcopy = .;
#endif
} > PLUGIN_RAM
+ /DISCARD/ :
+ {
+ *(.eh_frame)
+ }
+
#if defined(ARCH_IRIVER) || defined(ARCH_IPOD)
.iram IRAMORIG : AT ( iramcopy)
{
@@ -96,13 +96,29 @@ SECTIONS
*(.icode)
*(.irodata)
*(.idata)
- *(.ibss)
iramend = .;
} > PLUGIN_IRAM
+
+ .ibss (NOLOAD) :
+ {
+ iedata = .;
+ *(.ibss)
+ . = ALIGN(0x4);
+ iend = .;
+ } > PLUGIN_IRAM
+
+ .bss ADDR(.data) + SIZEOF(.data) + SIZEOF(.iram):
+#else
+ .bss :
#endif
+ {
+ *(.bss*)
+ } > PLUGIN_RAM
+
/* Special trick to avoid a linker error when no other sections are
left after garbage collection (plugin not for this platform) */
- .comment 0 : {
+ .comment 0 :
+ {
KEEP(*(.comment))
}
}
diff --git a/apps/plugins/rockboy/cpu.c b/apps/plugins/rockboy/cpu.c
index 6118633899..5c4abc519f 100644
--- a/apps/plugins/rockboy/cpu.c
+++ b/apps/plugins/rockboy/cpu.c
@@ -17,7 +17,7 @@
#endif
-struct cpu cpu IDATA_ATTR;
+struct cpu cpu IBSS_ATTR;
diff --git a/apps/plugins/rockboy/lcd.c b/apps/plugins/rockboy/lcd.c
index a8f8c695da..883c4952fc 100644
--- a/apps/plugins/rockboy/lcd.c
+++ b/apps/plugins/rockboy/lcd.c
@@ -15,7 +15,7 @@
struct lcd lcd;
-struct scan scan IDATA_ATTR;
+struct scan scan IBSS_ATTR;
#define BG (scan.bg)
#define WND (scan.wnd)
diff --git a/apps/plugins/rockboy/rockboy.c b/apps/plugins/rockboy/rockboy.c
index 90452e55d6..56773879fa 100644
--- a/apps/plugins/rockboy/rockboy.c
+++ b/apps/plugins/rockboy/rockboy.c
@@ -42,6 +42,8 @@ const struct {
extern char iramcopy[];
extern char iramstart[];
extern char iramend[];
+extern char iedata[];
+extern char iend[];
#endif
/* here is a global api struct pointer. while not strictly necessary,
@@ -116,6 +118,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
#ifdef USE_IRAM
memcpy(iramstart, iramcopy, iramend-iramstart);
+ memset(iedata, 0, iend - iedata);
#endif
shut=0;
cleanshut=0;