A modern Music Player Daemon based on Rockbox open source high quality audio player
libadwaita audio rust zig deno mpris rockbox mpd

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.

+35 -30
+35 -30
apps/plugins/plugin.lds
··· 247 247 { 248 248 *(.rodata*) 249 249 #if defined(IRAMSIZE) && IRAMSIZE == 0 250 - *(.irodata) 250 + *(.irodata) 251 251 #endif 252 + . = ALIGN(0x4); 252 253 } > PLUGIN_RAM 253 254 254 255 .data : 255 256 { 256 257 *(.data*) 257 258 #if defined(IRAMSIZE) && IRAMSIZE == 0 258 - *(.idata) 259 + *(.idata) 259 260 #endif 260 261 } > PLUGIN_RAM 261 262 ··· 265 266 . = ALIGN(CACHEALIGN_SIZE); 266 267 *(.ncdata*) 267 268 . = ALIGN(CACHEALIGN_SIZE); 268 - } AT> PLUGIN_RAM 269 - . -= NOCACHE_BASE; 269 + /* EABI currently needs iramcopy defined here, otherwise .iram can sometimes 270 + have an incorrect load address, breaking codecs. */ 271 + #if defined(IRAMSIZE) 272 + iramcopy = . - NOCACHE_BASE; 270 273 #endif 271 - 272 - #if defined(IRAMSIZE) && IRAMSIZE != 0 274 + } AT> PLUGIN_RAM 275 + /* This definition is used when NOCACHE_BASE is 0. The address offset bug only 276 + seems to occur when the empty .ncdata is present. */ 277 + #elif defined(IRAMSIZE) 273 278 iramcopy = .; 274 279 #endif 275 280 ··· 281 286 #endif 282 287 } 283 288 284 - .bss . (NOLOAD) : 289 + #if defined(IRAMSIZE) && IRAMSIZE != 0 290 + .iram IRAMORIG : AT ( iramcopy) 291 + { 292 + iramstart = .; 293 + *(.icode) 294 + *(.irodata) 295 + *(.idata) 296 + iramend = .; 297 + } > PLUGIN_IRAM 298 + 299 + 300 + .ibss (NOLOAD) : 301 + { 302 + iedata = .; 303 + *(.ibss) 304 + . = ALIGN(0x4); 305 + iend = .; 306 + } > PLUGIN_IRAM 307 + #endif 308 + 309 + .bss (NOLOAD) : 285 310 { 286 311 plugin_bss_start = .; 287 312 _plugin_bss_start = .; 288 313 *(.bss*) 289 314 #if defined(IRAMSIZE) && IRAMSIZE == 0 290 - *(.ibss) 315 + *(.ibss) 291 316 #endif 292 317 *(COMMON) 293 318 . = ALIGN(0x4); ··· 300 325 *(.ncbss*) 301 326 . = ALIGN(CACHEALIGN_SIZE); 302 327 } AT> PLUGIN_RAM 303 - . -= NOCACHE_BASE; 304 328 #endif 305 329 306 - /* Final end of plugin after IRAM setup */ 307 - .pluginend : 330 + /* Restore . */ 331 + .pluginend . - NOCACHE_BASE : 308 332 { 309 333 _plugin_end_addr = .; 310 334 plugin_end_addr = .; 311 335 } 312 - 313 - #if defined(IRAMSIZE) && IRAMSIZE != 0 314 - .iram IRAMORIG : AT (iramcopy) 315 - { 316 - iramstart = .; 317 - *(.icode) 318 - *(.irodata) 319 - *(.idata) 320 - iramend = .; 321 - } > PLUGIN_IRAM 322 - 323 - .ibss (NOLOAD) : 324 - { 325 - iedata = .; 326 - *(.ibss) 327 - . = ALIGN(0x4); 328 - iend = .; 329 - } > PLUGIN_IRAM 330 - #endif 331 336 332 337 /* Special trick to avoid a linker error when no other sections are 333 338 left after garbage collection (plugin not for this platform) */