diff options
Diffstat (limited to 'apps/plugins')
-rw-r--r-- | apps/plugins/plugin.lds | 48 | ||||
-rw-r--r-- | apps/plugins/rockboy/cpu.c | 2 | ||||
-rw-r--r-- | apps/plugins/rockboy/lcd.c | 2 | ||||
-rw-r--r-- | apps/plugins/rockboy/rockboy.c | 3 |
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 | |||
60 | 60 | ||
61 | SECTIONS | 61 | SECTIONS |
62 | { | 62 | { |
63 | .text : { | 63 | .text : |
64 | { | ||
64 | KEEP(*(.entry)) | 65 | KEEP(*(.entry)) |
65 | *(.text*) | 66 | *(.text*) |
66 | #if CONFIG_CPU==PP5020 | 67 | #if CONFIG_CPU==PP5020 |
@@ -69,26 +70,25 @@ SECTIONS | |||
69 | #endif | 70 | #endif |
70 | } > PLUGIN_RAM | 71 | } > PLUGIN_RAM |
71 | 72 | ||
72 | .data : { | 73 | .rodata : |
73 | *(.data*) | 74 | { |
74 | } > PLUGIN_RAM | ||
75 | |||
76 | /DISCARD/ : { | ||
77 | *(.eh_frame) | ||
78 | } | ||
79 | |||
80 | .bss : { | ||
81 | *(.bss*) | ||
82 | } > PLUGIN_RAM | ||
83 | |||
84 | .rodata : { | ||
85 | *(.rodata*) | 75 | *(.rodata*) |
86 | . = ALIGN(0x4); | 76 | . = ALIGN(0x4); |
77 | } > PLUGIN_RAM | ||
78 | |||
79 | .data : | ||
80 | { | ||
81 | *(.data*) | ||
87 | #if defined(ARCH_IRIVER) || defined(ARCH_IPOD) | 82 | #if defined(ARCH_IRIVER) || defined(ARCH_IPOD) |
88 | iramcopy = .; | 83 | iramcopy = .; |
89 | #endif | 84 | #endif |
90 | } > PLUGIN_RAM | 85 | } > PLUGIN_RAM |
91 | 86 | ||
87 | /DISCARD/ : | ||
88 | { | ||
89 | *(.eh_frame) | ||
90 | } | ||
91 | |||
92 | #if defined(ARCH_IRIVER) || defined(ARCH_IPOD) | 92 | #if defined(ARCH_IRIVER) || defined(ARCH_IPOD) |
93 | .iram IRAMORIG : AT ( iramcopy) | 93 | .iram IRAMORIG : AT ( iramcopy) |
94 | { | 94 | { |
@@ -96,13 +96,29 @@ SECTIONS | |||
96 | *(.icode) | 96 | *(.icode) |
97 | *(.irodata) | 97 | *(.irodata) |
98 | *(.idata) | 98 | *(.idata) |
99 | *(.ibss) | ||
100 | iramend = .; | 99 | iramend = .; |
101 | } > PLUGIN_IRAM | 100 | } > PLUGIN_IRAM |
101 | |||
102 | .ibss (NOLOAD) : | ||
103 | { | ||
104 | iedata = .; | ||
105 | *(.ibss) | ||
106 | . = ALIGN(0x4); | ||
107 | iend = .; | ||
108 | } > PLUGIN_IRAM | ||
109 | |||
110 | .bss ADDR(.data) + SIZEOF(.data) + SIZEOF(.iram): | ||
111 | #else | ||
112 | .bss : | ||
102 | #endif | 113 | #endif |
114 | { | ||
115 | *(.bss*) | ||
116 | } > PLUGIN_RAM | ||
117 | |||
103 | /* Special trick to avoid a linker error when no other sections are | 118 | /* Special trick to avoid a linker error when no other sections are |
104 | left after garbage collection (plugin not for this platform) */ | 119 | left after garbage collection (plugin not for this platform) */ |
105 | .comment 0 : { | 120 | .comment 0 : |
121 | { | ||
106 | KEEP(*(.comment)) | 122 | KEEP(*(.comment)) |
107 | } | 123 | } |
108 | } | 124 | } |
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 @@ | |||
17 | #endif | 17 | #endif |
18 | 18 | ||
19 | 19 | ||
20 | struct cpu cpu IDATA_ATTR; | 20 | struct cpu cpu IBSS_ATTR; |
21 | 21 | ||
22 | 22 | ||
23 | 23 | ||
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 @@ | |||
15 | 15 | ||
16 | struct lcd lcd; | 16 | struct lcd lcd; |
17 | 17 | ||
18 | struct scan scan IDATA_ATTR; | 18 | struct scan scan IBSS_ATTR; |
19 | 19 | ||
20 | #define BG (scan.bg) | 20 | #define BG (scan.bg) |
21 | #define WND (scan.wnd) | 21 | #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 { | |||
42 | extern char iramcopy[]; | 42 | extern char iramcopy[]; |
43 | extern char iramstart[]; | 43 | extern char iramstart[]; |
44 | extern char iramend[]; | 44 | extern char iramend[]; |
45 | extern char iedata[]; | ||
46 | extern char iend[]; | ||
45 | #endif | 47 | #endif |
46 | 48 | ||
47 | /* here is a global api struct pointer. while not strictly necessary, | 49 | /* 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) | |||
116 | 118 | ||
117 | #ifdef USE_IRAM | 119 | #ifdef USE_IRAM |
118 | memcpy(iramstart, iramcopy, iramend-iramstart); | 120 | memcpy(iramstart, iramcopy, iramend-iramstart); |
121 | memset(iedata, 0, iend - iedata); | ||
119 | #endif | 122 | #endif |
120 | shut=0; | 123 | shut=0; |
121 | cleanshut=0; | 124 | cleanshut=0; |