On Tue, Jun 08, 2021 at 05:22:51PM +0000, Christophe Leroy wrote: > Comment says that __main() is there to make GCC happy. > > It's been there since the implementation of ppc arch in Linux 1.3.45. > > ppc32 is the only architecture having that. Even ppc64 doesn't have it. > > Seems like GCC is still happy without it. > > Drop it for good.
If you used G++ to build the kernel there could be a call to __main inserted under some circumstances. It is used in functions called "main" if there is no other way to do initialisations (this should not happen if you use -ffreestanding, and there should not be a function called "main" anyway, but who knows). Either way, yup, this is ancient history :-) Segher