Is arch/x86/boot/main.c main obsolete?

jim.cromie at jim.cromie at
Mon Jul 18 22:41:54 EDT 2022

On Sat, Jun 25, 2022 at 5:35 PM ebashinskii <ebashinskii at> wrote:

> CPU: Intel x86 KabyLake. I'm using 5.17 Kernel built from upstream and
> GRUB 2.04
> When debugging the kernel initialization process I found out that there is
> a function *void main(void)* in the source file *arch/x86/boot/main.c* (source
> link:
> which
> seems to be the entry point which the boot loader is supposed to jump into.
> But *objdump*-ing the Kernel image shows that there is no such symbol as
> *main*. GDB attached to QEMU does not know about this symbol either.
> The earliest stage of Kernel Initialization I could manage to catch with
> GDB is *x86_64_start_kernel* (source link:
> )

What are you trying to do that start-kernel is insufficiently early ?

main.c 's that you dont hit dont really matter do they ?

fwiw, I really like virtme

    virtme-run $KRUN_SHOW $KRUN_STDS $KDBG_OPTS $* $QM_OPTS --smp 3 -s -S

the -s -S stops me early enough to anything Ive needed to so far.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the Kernelnewbies mailing list