[PATCH] treewide: drop PRE_IMAGE linker script hook
Sascha Hauer
s.hauer at pengutronix.de
Wed Sep 30 23:40:20 PDT 2026
PRE_IMAGE let a SoC put data in front of the image, e.g. a BootROM
header at a fixed offset. Its last user went away with commit
0900665e01 ("ARM: remove ep93xx"), and since then it always expands
to nothing. Remove the empty default and its users in the ARM PBL
and MIPS linker scripts.
With PRE_IMAGE gone, __image_start and _text are both at the start
of the ARM PBL image.
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
arch/arm/lib/pbl.lds.S | 2 --
arch/mips/lib/barebox.lds.S | 2 --
arch/mips/lib/pbl.lds.S | 2 --
include/asm-generic/barebox.lds.h | 4 ----
4 files changed, 10 deletions(-)
diff --git a/arch/arm/lib/pbl.lds.S b/arch/arm/lib/pbl.lds.S
index 72aca83495..c4abfc5989 100644
--- a/arch/arm/lib/pbl.lds.S
+++ b/arch/arm/lib/pbl.lds.S
@@ -40,8 +40,6 @@ SECTIONS
.image_start : { *(.__image_start) }
- PRE_IMAGE
-
. = ALIGN(4);
._text : { *(._text) }
.text :
diff --git a/arch/mips/lib/barebox.lds.S b/arch/mips/lib/barebox.lds.S
index bbb9b11499..7dda8b80f1 100644
--- a/arch/mips/lib/barebox.lds.S
+++ b/arch/mips/lib/barebox.lds.S
@@ -26,8 +26,6 @@ SECTIONS
}
BAREBOX_BARE_INIT_SIZE
- PRE_IMAGE
-
. = ALIGN(4);
__start_rodata = .;
.rodata : {
diff --git a/arch/mips/lib/pbl.lds.S b/arch/mips/lib/pbl.lds.S
index cca980c35f..b5c73999dd 100644
--- a/arch/mips/lib/pbl.lds.S
+++ b/arch/mips/lib/pbl.lds.S
@@ -15,8 +15,6 @@ SECTIONS
{
. = BASE;
- PRE_IMAGE
-
. = ALIGN(4);
.text :
{
diff --git a/include/asm-generic/barebox.lds.h b/include/asm-generic/barebox.lds.h
index c672894ad5..7dafe10a8e 100644
--- a/include/asm-generic/barebox.lds.h
+++ b/include/asm-generic/barebox.lds.h
@@ -8,10 +8,6 @@
#define STRUCT_ALIGNMENT 32
#define STRUCT_ALIGN() . = ALIGN(STRUCT_ALIGNMENT)
-#ifndef PRE_IMAGE
-#define PRE_IMAGE
-#endif
-
#define BAREBOX_INITCALLS \
STRUCT_ALIGN(); \
__barebox_initcalls_start = .; \
--
2.47.3
More information about the barebox
mailing list