mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] ARM64: asm: mark __barebox_arm64_head as function
@ 2022-11-25 10:09 Ahmad Fatoum
  2022-12-02  7:46 ` Sascha Hauer
  0 siblings, 1 reply; 2+ messages in thread
From: Ahmad Fatoum @ 2022-11-25 10:09 UTC (permalink / raw)
  To: barebox; +Cc: Ahmad Fatoum

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; \
    END(name)

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

Signed-off-by: Ahmad Fatoum <a.fatoum@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
 	.endr
-END(__barebox_arm64_head)
+ENDPROC(__barebox_arm64_head)
-- 
2.30.2




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-12-02  7:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-25 10:09 [PATCH] ARM64: asm: mark __barebox_arm64_head as function Ahmad Fatoum
2022-12-02  7:46 ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox