summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSolomon Peachy <pizza@shaftnet.org>2020-07-03 17:39:39 -0400
committerSolomon Peachy <pizza@shaftnet.org>2020-07-05 03:34:30 +0000
commitcd9906847b7a8eaccc4e5927200cd75db99d219f (patch)
tree0e18a4687c1307b07f0caacc2d1e8ab65d2e298c
parent905e19905b8601b672ed9a9b7121dfdb2444602c (diff)
downloadrockbox-cd9906847b7a8eaccc4e5927200cd75db99d219f.tar.gz
rockbox-cd9906847b7a8eaccc4e5927200cd75db99d219f.zip
arm: Fix PortalPlayer linker scripts with binutils 2.21+
For reasons that are still unclear, the 'ncbss' region was overlapping the "audiobuffer" when linked with 2.21, but okay with 2.20. Fixed it by making the audiobuffer explcitly use the current position instead of relying on it being implicit. With this change, portalplayer-based targets generate working binaries when built with binutils 2.21 or newer. This bug also theoretically affects imx233/imx31 targets as they also have NOCACHE_BASE games in their linker scripts, but I lack access to one to test with. Change-Id: Idb38ab20f03599b9ed3d4bc0eafe519f38677438
-rw-r--r--firmware/target/arm/imx233/app.lds2
-rw-r--r--firmware/target/arm/imx233/boot.lds2
-rw-r--r--firmware/target/arm/imx31/app.lds4
-rw-r--r--firmware/target/arm/imx31/boot.lds4
-rw-r--r--firmware/target/arm/pp/app-pp.lds2
5 files changed, 7 insertions, 7 deletions
diff --git a/firmware/target/arm/imx233/app.lds b/firmware/target/arm/imx233/app.lds
index 189355d84e..2b13496c1f 100644
--- a/firmware/target/arm/imx233/app.lds
+++ b/firmware/target/arm/imx233/app.lds
@@ -116,7 +116,7 @@ SECTIONS
116 _end = .; 116 _end = .;
117 } > DRAM 117 } > DRAM
118 118
119 .audiobuf (NOLOAD) : 119 .audiobuf _end (NOLOAD) :
120 { 120 {
121 _audiobuffer = .; 121 _audiobuffer = .;
122 audiobuffer = .; 122 audiobuffer = .;
diff --git a/firmware/target/arm/imx233/boot.lds b/firmware/target/arm/imx233/boot.lds
index dfabefdf9b..eef8be7a4b 100644
--- a/firmware/target/arm/imx233/boot.lds
+++ b/firmware/target/arm/imx233/boot.lds
@@ -90,7 +90,7 @@ SECTIONS
90 . = ALIGN(CACHEALIGN_SIZE); 90 . = ALIGN(CACHEALIGN_SIZE);
91 } AT> DRAM 91 } AT> DRAM
92 92
93 .bssendadr (NOLOAD) : 93 .bssendadr . (NOLOAD) :
94 { 94 {
95 _end = .; 95 _end = .;
96 } > DRAM 96 } > DRAM
diff --git a/firmware/target/arm/imx31/app.lds b/firmware/target/arm/imx31/app.lds
index fe6cafb59f..56d0f435d1 100644
--- a/firmware/target/arm/imx31/app.lds
+++ b/firmware/target/arm/imx31/app.lds
@@ -122,7 +122,7 @@ SECTIONS
122 *(COMMON) 122 *(COMMON)
123 . = ALIGN(0x4); 123 . = ALIGN(0x4);
124 } > DRAM 124 } > DRAM
125 125
126 .ncbss . + NOCACHE_BASE (NOLOAD) : 126 .ncbss . + NOCACHE_BASE (NOLOAD) :
127 { 127 {
128 . = ALIGN(CACHEALIGN_SIZE); /* >= Cache line boundary */ 128 . = ALIGN(CACHEALIGN_SIZE); /* >= Cache line boundary */
@@ -135,7 +135,7 @@ SECTIONS
135 _end = .; 135 _end = .;
136 } > DRAM 136 } > DRAM
137 137
138 .audiobuf (NOLOAD) : 138 .audiobuf _end (NOLOAD) :
139 { 139 {
140 _audiobuffer = .; 140 _audiobuffer = .;
141 audiobuffer = .; 141 audiobuffer = .;
diff --git a/firmware/target/arm/imx31/boot.lds b/firmware/target/arm/imx31/boot.lds
index be1d98e507..6b0eb8fb1f 100644
--- a/firmware/target/arm/imx31/boot.lds
+++ b/firmware/target/arm/imx31/boot.lds
@@ -93,7 +93,7 @@ SECTIONS
93 *(COMMON) 93 *(COMMON)
94 . = ALIGN(0x4); 94 . = ALIGN(0x4);
95 } > DRAM 95 } > DRAM
96 96
97 .ncbss . + NOCACHE_BASE (NOLOAD) : 97 .ncbss . + NOCACHE_BASE (NOLOAD) :
98 { 98 {
99 . = ALIGN(CACHEALIGN_SIZE); /* >= Cache line boundary */ 99 . = ALIGN(CACHEALIGN_SIZE); /* >= Cache line boundary */
@@ -106,7 +106,7 @@ SECTIONS
106 _end = .; 106 _end = .;
107 } > DRAM 107 } > DRAM
108 108
109 .qharray (NOLOAD) : 109 .qharray _end (NOLOAD) :
110 { 110 {
111 _qharray = .; 111 _qharray = .;
112 *(.qharray) 112 *(.qharray)
diff --git a/firmware/target/arm/pp/app-pp.lds b/firmware/target/arm/pp/app-pp.lds
index 0b8cbd8430..3fdf55e332 100644
--- a/firmware/target/arm/pp/app-pp.lds
+++ b/firmware/target/arm/pp/app-pp.lds
@@ -169,7 +169,7 @@ SECTIONS
169 _end = .; 169 _end = .;
170 } > DRAM 170 } > DRAM
171 171
172 .audiobuf (NOLOAD) : 172 .audiobuf _end (NOLOAD) :
173 { 173 {
174 _audiobuffer = .; 174 _audiobuffer = .;
175 . = ALIGN(0x4); 175 . = ALIGN(0x4);