diff options
Diffstat (limited to 'apps/plugins')
-rw-r--r-- | apps/plugins/plugin.lds | 1 | ||||
-rw-r--r-- | apps/plugins/rockboy.c | 4 | ||||
-rwxr-xr-x | apps/plugins/rockboy/archos.lds | 13 |
3 files changed, 11 insertions, 7 deletions
diff --git a/apps/plugins/plugin.lds b/apps/plugins/plugin.lds index fc9d4d4efe..84617b9b4e 100644 --- a/apps/plugins/plugin.lds +++ b/apps/plugins/plugin.lds | |||
@@ -113,6 +113,7 @@ SECTIONS | |||
113 | #endif | 113 | #endif |
114 | { | 114 | { |
115 | *(.bss*) | 115 | *(.bss*) |
116 | *(COMMON) | ||
116 | } > PLUGIN_RAM | 117 | } > PLUGIN_RAM |
117 | 118 | ||
118 | /* Special trick to avoid a linker error when no other sections are | 119 | /* Special trick to avoid a linker error when no other sections are |
diff --git a/apps/plugins/rockboy.c b/apps/plugins/rockboy.c index d531c9405b..e2ffc30d99 100644 --- a/apps/plugins/rockboy.c +++ b/apps/plugins/rockboy.c | |||
@@ -69,10 +69,12 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) | |||
69 | " overlay doesn't fit into memory."); | 69 | " overlay doesn't fit into memory."); |
70 | return PLUGIN_ERROR; | 70 | return PLUGIN_ERROR; |
71 | } | 71 | } |
72 | rb->memset(header.start_addr, 0, header.end_addr - header.start_addr); | ||
73 | |||
72 | rb->lseek(fh, 0, SEEK_SET); | 74 | rb->lseek(fh, 0, SEEK_SET); |
73 | readsize = rb->read(fh, header.start_addr, header.end_addr - header.start_addr); | 75 | readsize = rb->read(fh, header.start_addr, header.end_addr - header.start_addr); |
74 | rb->close(fh); | 76 | rb->close(fh); |
75 | if (readsize != header.end_addr - header.start_addr) | 77 | if (readsize <= sizeof(header)) |
76 | { | 78 | { |
77 | rb->splash(2*HZ, true, "Error loading " OVL_DISPLAYNAME " overlay."); | 79 | rb->splash(2*HZ, true, "Error loading " OVL_DISPLAYNAME " overlay."); |
78 | return PLUGIN_ERROR; | 80 | return PLUGIN_ERROR; |
diff --git a/apps/plugins/rockboy/archos.lds b/apps/plugins/rockboy/archos.lds index 9412c4365a..55db1e2e30 100755 --- a/apps/plugins/rockboy/archos.lds +++ b/apps/plugins/rockboy/archos.lds | |||
@@ -28,18 +28,19 @@ SECTIONS | |||
28 | *(.text) | 28 | *(.text) |
29 | } > OVERLAY_RAM | 29 | } > OVERLAY_RAM |
30 | 30 | ||
31 | .rodata : { | ||
32 | *(.rodata) | ||
33 | *(.rodata.str1.1) | ||
34 | *(.rodata.str1.4) | ||
35 | } > OVERLAY_RAM | ||
36 | |||
31 | .data : { | 37 | .data : { |
32 | *(.data) | 38 | *(.data) |
33 | } > OVERLAY_RAM | 39 | } > OVERLAY_RAM |
34 | 40 | ||
35 | .bss : { | 41 | .bss : { |
36 | *(.bss) | 42 | *(.bss) |
37 | } > OVERLAY_RAM | 43 | *(COMMON) |
38 | |||
39 | .rodata : { | ||
40 | *(.rodata) | ||
41 | *(.rodata.str1.1) | ||
42 | *(.rodata.str1.4) | ||
43 | . = ALIGN(0x4); | 44 | . = ALIGN(0x4); |
44 | _ovl_end_addr = .; | 45 | _ovl_end_addr = .; |
45 | } > OVERLAY_RAM | 46 | } > OVERLAY_RAM |