kerla icon indicating copy to clipboard operation
kerla copied to clipboard

Compress symbol table

Open nuta opened this issue 3 years ago • 3 comments

Currently, a symbol table reserves 2MiB space to store symbols (e.g. function names) of the kernel. Because symbols in Rust tend to be lengthy, they are truncated to 55 characters.

This issue aims to implement a simple symbol table compression to:

  • Decrease the kernel image size.
  • Print the whole symbol name (avoid truncating).

nuta avatar Nov 28 '21 13:11 nuta

Ref: LLVM's string table builder: https://github.com/llvm/llvm-project/blob/main/llvm/include/llvm/MC/StringTableBuilder.h

nuta avatar Nov 28 '21 13:11 nuta

Ref: Using trie would be better, as used in Mach-O: https://github.com/llvm/llvm-project/blob/main/lld/MachO/ExportTrie.cpp

nuta avatar Nov 28 '21 13:11 nuta

Why do you need to keep the symbol table with the running kernel?

michalfita avatar Nov 28 '21 16:11 michalfita