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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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: https://elixir.bootlin.com/linux/v5.17/source/arch/x86/boot/main.c#L134) 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: https://elixir.bootlin.com/linux/v5.17/source/arch/x86/kernel/head64.c#L467)

The question is what function GRUB actually jump into passing control to the Kernel code and what is the purpose of arch/x86/boot/main.c::main?
_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]

  Powered by Linux