The LTO symbol table read by the linker plugin does not contain static symbols.
This is fine for the linker, but changes behavior of gcc-nm (which also uses the linker plugin) drastically. Normally nm prints all static symbols too.
This is a problem for example if a program wants to get the full symbols for debugging purposes.
The ltosymtab should probably add this information, but only output it for nm
Hmm, I am not sure how useful this would be: the static symbols are to be quite aggressively optimized/renamed before they hit the final binary. What would be a resonable use of this information?
This is needed for example to generate backtraces, if the symbol table should be built in instead of read from the binary.
The Linux kernel cannot read its own binary, so the symbol table has to built in.