[PATCH] imd: drop .barebox_imd section from arm/riscv non-PBL lds

Ahmad Fatoum a.fatoum at barebox.org
Sun Nov 2 23:42:40 PST 2025


Both ARM and RISC-V are platforms that always have a PBL in front of
barebox proper.

As this means any IMD tags in barebox proper would be usually compressed
and thus not visible to software outside, we can just drop these
sections from the barebox.lds.S, knowing that pbl.lds.S includes them.

Signed-off-by: Ahmad Fatoum <a.fatoum at barebox.org>
---
 arch/arm/lib32/barebox.lds.S | 2 --
 arch/arm/lib64/barebox.lds.S | 2 --
 arch/riscv/lib/barebox.lds.S | 2 --
 3 files changed, 6 deletions(-)

diff --git a/arch/arm/lib32/barebox.lds.S b/arch/arm/lib32/barebox.lds.S
index b304561a9859..877788eb8083 100644
--- a/arch/arm/lib32/barebox.lds.S
+++ b/arch/arm/lib32/barebox.lds.S
@@ -69,8 +69,6 @@ SECTIONS
 		CONSTRUCTORS
 	}
 
-	.barebox_imd : { BAREBOX_IMD }
-
 	. = .;
 
 	BAREBOX_RELOCATION_TABLE
diff --git a/arch/arm/lib64/barebox.lds.S b/arch/arm/lib64/barebox.lds.S
index e6406b04d135..44f23fe275dc 100644
--- a/arch/arm/lib64/barebox.lds.S
+++ b/arch/arm/lib64/barebox.lds.S
@@ -46,8 +46,6 @@ SECTIONS
 
 	.data : { *(.data*) }
 
-	.barebox_imd : { BAREBOX_IMD }
-
 	BAREBOX_RELOCATION_TABLE
 
 	_edata = .;
diff --git a/arch/riscv/lib/barebox.lds.S b/arch/riscv/lib/barebox.lds.S
index e71bd89fb144..f6e6b29b412f 100644
--- a/arch/riscv/lib/barebox.lds.S
+++ b/arch/riscv/lib/barebox.lds.S
@@ -58,8 +58,6 @@ SECTIONS
 	. = ALIGN(4);
 	.data : { *(.data*) }
 
-	.barebox_imd : { BAREBOX_IMD }
-
 	/DISCARD/ : { *(.rela.plt*) }
 	.rela.dyn : {
 		__rel_dyn_start = .;
-- 
2.47.3




More information about the barebox mailing list