1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
diff --git a/apps/plugins/plugin.lds b/apps/plugins/plugin.lds
index 6b608fc..fcfbf3b 100644
--- a/apps/plugins/plugin.lds
+++ b/apps/plugins/plugin.lds
@@ -231,11 +231,16 @@ SECTIONS
         . = ALIGN(CACHEALIGN_SIZE);
         *(.ncdata*)
         . = ALIGN(CACHEALIGN_SIZE);
-    } AT> PLUGIN_RAM
-#endif
-
+/* EABI currently needs iramcopy defined here, otherwise .iram can sometimes
+   have an incorrect load address, breaking codecs. */
 #if defined(IRAMSIZE)
-    iramcopy = . - NOCACHE_BASE;
+        iramcopy = . - NOCACHE_BASE;
+#endif
+    } 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

     /DISCARD/ :