Hi Tom! On 5/8/25 00:51, Tom Rini wrote: > On Wed, May 07, 2025 at 07:07:03PM +0000, Johannes Krottmayer wrote: >> Hi Tom! >> >> Okay, STT_FUNC is an alternative spelling for %function, didn't >> know that before. So my question is deprecated. >> >> Sorry, for wasting your time. >> >> BTW, I will add the required macros and also try to add the VFP >> support. But I think it's better in two different patches. First >> patch with the ENTRY/ENDPROC macros and later with the VFP patch. > > Ah, thanks. I too didn't know about STT_FUNC until now. So I think that > means all we really need then is to use ENTRY/ENDPROC on that function? >
I have added the required macros, also for the 'reset' function. There were also the .globl and .type directive used. Additional I added some comments, if they are not needed I can remove them. Also have changed in 'c_runtime_cpu_setup' the code 'mov pc, lr' to 'bx lr', because I think for newer programmers this is sometimes misleading. Also for me at the beginning on ARM in the past. Here is the full code for start.S, which I have modified: /* SPDX-License-Identifier: GPL-2.0+ */ /* * (C) Copyright 2015 * Kamil Lulko, <kamil.lu...@gmail.com> */ #include <linux/linkage.h> #include <asm/assembler.h> /* * Startup code (reset vector) */ ENTRY(reset) W(b) _main @ Jump to _main (C runtime crt0.S) ENDPROC(reset) /* * Setup CPU for C runtime */ ENTRY(c_runtime_cpu_setup) bx lr @ Jump back to caller ENDPROC(c_runtime_cpu_setup) If this is okay for you, I will release a patch v2 for it. if not, (coding style, ...) then please tell me that. Kind regards, Johannes