Re: [PATCH 00/45] C++: Convert the kernel to C++

From: David Howells
Date: Fri Jan 12 2024 - 18:41:31 EST


Arsen Arsenović <arsen@xxxxxxxxx> wrote:

> >> > (7) 'class', 'private', 'namespace'.
> >>
> >> 'class' does nothing that struct doesn't do, private and namespace serve
> >> simply for encapsulation, so I don't see why banning these is useful.
> >
> > Namespaces would lead to image bloat as they make the symbols bigger.
> > Remember, the symbol list uses up unswappable memory.
>
> Ah, I was not aware of this restriction of the kernel (my understanding
> was that the symbol table is outside of the kernel image). That poses a
> problem, yes. I wonder if a big part of the symbol table (or even the
> entirety of it) could be dropped from the kernel. I must say, I do not
> know why the kernel has it, so I cannot speak on this issue.

You need at least a partial symbol table for module loading and we also have
the symbol table optionally included for oops message generation.

David