From cd9906847b7a8eaccc4e5927200cd75db99d219f Mon Sep 17 00:00:00 2001 From: Solomon Peachy Date: Fri, 3 Jul 2020 17:39:39 -0400 Subject: 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 --- firmware/target/arm/imx233/app.lds | 2 +- firmware/target/arm/imx233/boot.lds | 2 +- firmware/target/arm/imx31/app.lds | 4 ++-- firmware/target/arm/imx31/boot.lds | 4 ++-- firmware/target/arm/pp/app-pp.lds | 2 +- 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 _end = .; } > DRAM - .audiobuf (NOLOAD) : + .audiobuf _end (NOLOAD) : { _audiobuffer = .; 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 . = ALIGN(CACHEALIGN_SIZE); } AT> DRAM - .bssendadr (NOLOAD) : + .bssendadr . (NOLOAD) : { _end = .; } > 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 *(COMMON) . = ALIGN(0x4); } > DRAM - + .ncbss . + NOCACHE_BASE (NOLOAD) : { . = ALIGN(CACHEALIGN_SIZE); /* >= Cache line boundary */ @@ -135,7 +135,7 @@ SECTIONS _end = .; } > DRAM - .audiobuf (NOLOAD) : + .audiobuf _end (NOLOAD) : { _audiobuffer = .; 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 *(COMMON) . = ALIGN(0x4); } > DRAM - + .ncbss . + NOCACHE_BASE (NOLOAD) : { . = ALIGN(CACHEALIGN_SIZE); /* >= Cache line boundary */ @@ -106,7 +106,7 @@ SECTIONS _end = .; } > DRAM - .qharray (NOLOAD) : + .qharray _end (NOLOAD) : { _qharray = .; *(.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 _end = .; } > DRAM - .audiobuf (NOLOAD) : + .audiobuf _end (NOLOAD) : { _audiobuffer = .; . = ALIGN(0x4); -- cgit v1.2.3