diff options
| author | Michael Sevakis <jethead71@rockbox.org> | 2013-07-11 00:28:39 -0400 |
|---|---|---|
| committer | Michael Sevakis <jethead71@rockbox.org> | 2013-07-11 00:28:39 -0400 |
| commit | 2948cb42aecfe42a2dcad40d7791f703512891aa (patch) | |
| tree | 4b9041993ed94840d6f5c8f8cc53dab6eac75100 /apps/plugins/plugin.lds | |
| parent | 5c2ad2fd36be7a0d1ec2468e6b270047c36d8a6f (diff) | |
| download | rockbox-2948cb42aecfe42a2dcad40d7791f703512891aa.zip rockbox-2948cb42aecfe42a2dcad40d7791f703512891aa.tar.gz rockbox-2948cb42aecfe42a2dcad40d7791f703512891aa.tar.bz2 rockbox-2948cb42aecfe42a2dcad40d7791f703512891aa.tar.xz | |
Revert "Fix .ncbss from possibly overlapping .ncdata in plugins/codecs."
This reverts commit 5c2ad2fd36be7a0d1ec2468e6b270047c36d8a6f.
The .ncbss bug is still showing up. Will try again shortly.
Diffstat (limited to 'apps/plugins/plugin.lds')
| -rw-r--r-- | apps/plugins/plugin.lds | 65 |
1 files changed, 35 insertions, 30 deletions
diff --git a/apps/plugins/plugin.lds b/apps/plugins/plugin.lds index d5cfaae..10ce98f 100644 --- a/apps/plugins/plugin.lds +++ b/apps/plugins/plugin.lds @@ -247,15 +247,16 @@ SECTIONS { *(.rodata*) #if defined(IRAMSIZE) && IRAMSIZE == 0 - *(.irodata) + *(.irodata) #endif + . = ALIGN(0x4); } > PLUGIN_RAM .data : { *(.data*) #if defined(IRAMSIZE) && IRAMSIZE == 0 - *(.idata) + *(.idata) #endif } > PLUGIN_RAM @@ -265,11 +266,15 @@ SECTIONS . = ALIGN(CACHEALIGN_SIZE); *(.ncdata*) . = ALIGN(CACHEALIGN_SIZE); - } AT> PLUGIN_RAM - . -= NOCACHE_BASE; +/* EABI currently needs iramcopy defined here, otherwise .iram can sometimes + have an incorrect load address, breaking codecs. */ +#if defined(IRAMSIZE) + iramcopy = . - NOCACHE_BASE; #endif - -#if defined(IRAMSIZE) && IRAMSIZE != 0 + } AT> PLUGIN_RAM +/* This definition is used when NOCACHE_BASE is 0. The address offset bug only + seems to occur when the empty .ncdata is present. */ +#elif defined(IRAMSIZE) iramcopy = .; #endif @@ -281,13 +286,33 @@ SECTIONS #endif } - .bss . (NOLOAD) : +#if defined(IRAMSIZE) && IRAMSIZE != 0 + .iram IRAMORIG : AT ( iramcopy) + { + iramstart = .; + *(.icode) + *(.irodata) + *(.idata) + iramend = .; + } > PLUGIN_IRAM + + + .ibss (NOLOAD) : + { + iedata = .; + *(.ibss) + . = ALIGN(0x4); + iend = .; + } > PLUGIN_IRAM +#endif + + .bss (NOLOAD) : { plugin_bss_start = .; _plugin_bss_start = .; *(.bss*) #if defined(IRAMSIZE) && IRAMSIZE == 0 - *(.ibss) + *(.ibss) #endif *(COMMON) . = ALIGN(0x4); @@ -300,35 +325,15 @@ SECTIONS *(.ncbss*) . = ALIGN(CACHEALIGN_SIZE); } AT> PLUGIN_RAM - . -= NOCACHE_BASE; #endif - /* Final end of plugin after IRAM setup */ - .pluginend : + /* Restore . */ + .pluginend . - NOCACHE_BASE : { _plugin_end_addr = .; plugin_end_addr = .; } -#if defined(IRAMSIZE) && IRAMSIZE != 0 - .iram IRAMORIG : AT (iramcopy) - { - iramstart = .; - *(.icode) - *(.irodata) - *(.idata) - iramend = .; - } > PLUGIN_IRAM - - .ibss (NOLOAD) : - { - iedata = .; - *(.ibss) - . = ALIGN(0x4); - iend = .; - } > PLUGIN_IRAM -#endif - /* Special trick to avoid a linker error when no other sections are left after garbage collection (plugin not for this platform) */ .comment 0 : |