[PATCH] ARM64: asm: mark __barebox_arm64_head as function

Ahmad Fatoum a.fatoum at pengutronix.de
Fri Nov 25 02:09:59 PST 2022

Calling objdump -d on the PBL ELF file will not disassemble the
instructions comprising __barebox_arm64_head and instead will just
print a hexdump. This is because we use linker magic to get the section
in front of the text segment and GAS fails to detect that
__barebox_arm64_head too is of function type. This is no longer the case
with ENDPROC as it uses the GAS .type directive to explicitly mark
a symbol as being a function:

  #define ENDPROC(name) \
    .type name, @function; \

This only has effect on the ELF and introduces no functional change for
the objcopied image.

Signed-off-by: Ahmad Fatoum <a.fatoum at pengutronix.de>
 arch/arm/cpu/head_64.S | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/cpu/head_64.S b/arch/arm/cpu/head_64.S
index f934e96c6eaf..398c4d3471e0 100644
--- a/arch/arm/cpu/head_64.S
+++ b/arch/arm/cpu/head_64.S
@@ -30,4 +30,4 @@ ENTRY(__barebox_arm64_head)
 	.rept 8
 	.word 0x55555555

More information about the barebox mailing list