diff options
| author | Jens Arnold <amiconn@rockbox.org> | 2006-01-08 23:45:29 +0000 |
|---|---|---|
| committer | Jens Arnold <amiconn@rockbox.org> | 2006-01-08 23:45:29 +0000 |
| commit | a991de3730da92745689cec8d2f64aa5b795c76a (patch) | |
| tree | 9f095d4a4ebdd838b2ef44774801b843b9ce05a0 /apps/plugins | |
| parent | 07c4254135aecc6ae0964d6d6413a40251e8f6a8 (diff) | |
| download | rockbox-a991de3730da92745689cec8d2f64aa5b795c76a.zip rockbox-a991de3730da92745689cec8d2f64aa5b795c76a.tar.gz rockbox-a991de3730da92745689cec8d2f64aa5b795c76a.tar.bz2 rockbox-a991de3730da92745689cec8d2f64aa5b795c76a.tar.xz | |
Don't include the .bss section in the archos rockboy overlay as well. Explicitly add common symbols to .bss section for plugins and codecs.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8309 a1c6a512-1295-4272-9138-f99709370657
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 fc9d4d4..84617b9 100644 --- a/apps/plugins/plugin.lds +++ b/apps/plugins/plugin.lds @@ -113,6 +113,7 @@ SECTIONS #endif { *(.bss*) + *(COMMON) } > PLUGIN_RAM /* 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 d531c94..e2ffc30 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) " overlay doesn't fit into memory."); return PLUGIN_ERROR; } + rb->memset(header.start_addr, 0, header.end_addr - header.start_addr); + rb->lseek(fh, 0, SEEK_SET); readsize = rb->read(fh, header.start_addr, header.end_addr - header.start_addr); rb->close(fh); - if (readsize != header.end_addr - header.start_addr) + if (readsize <= sizeof(header)) { rb->splash(2*HZ, true, "Error loading " OVL_DISPLAYNAME " overlay."); return PLUGIN_ERROR; diff --git a/apps/plugins/rockboy/archos.lds b/apps/plugins/rockboy/archos.lds index 9412c43..55db1e2 100755 --- a/apps/plugins/rockboy/archos.lds +++ b/apps/plugins/rockboy/archos.lds @@ -28,18 +28,19 @@ SECTIONS *(.text) } > OVERLAY_RAM + .rodata : { + *(.rodata) + *(.rodata.str1.1) + *(.rodata.str1.4) + } > OVERLAY_RAM + .data : { *(.data) } > OVERLAY_RAM .bss : { *(.bss) - } > OVERLAY_RAM - - .rodata : { - *(.rodata) - *(.rodata.str1.1) - *(.rodata.str1.4) + *(COMMON) . = ALIGN(0x4); _ovl_end_addr = .; } > OVERLAY_RAM |