nuta / kerla

A new operating system kernel with Linux binary compatibility written in Rust.
Other
3.33k stars 89 forks source link

Compress symbol table #109

Open nuta opened 2 years ago

nuta commented 2 years ago

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:

nuta commented 2 years ago

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

nuta commented 2 years ago

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

michalfita commented 2 years ago

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