[PATCH] ARM: ARM64: linker: Do not put first function at __image_start

Sascha Hauer s.hauer at pengutronix.de
Thu May 21 01:06:08 PDT 2026


The very first function in the barebox binary starts at __image_start
aka _stext, so resolving its name with %pS results in "__image_start"
instead of the function name. This can be confusing, so add a small
offset to the first function so that its name resolves properly.

Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
 arch/arm/lib64/barebox.lds.S | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm/lib64/barebox.lds.S b/arch/arm/lib64/barebox.lds.S
index bd76a0ca96..1dddd6d1a9 100644
--- a/arch/arm/lib64/barebox.lds.S
+++ b/arch/arm/lib64/barebox.lds.S
@@ -26,6 +26,7 @@ SECTIONS
 	.text      :
 	{
 		_stext = .;
+		. += 16;
 		*(.text*)
 	} :text
 
-- 
2.47.3




More information about the barebox mailing list