Carl-Daniel Hailfinger wrote:
Any non-static functions in a file will stay in the final binary, unless you do some trickery like -combine, but that usually requires some changes to the build system.
We already have CONFIG_WHOLE_PROGRAM_COMPILE in v3. I can make sure it is available for all stages. Right now it is only used for initram.
As I said, it requires changes to the build system. :-)