diff options
| author | Andi Kleen <ak@muc.de> | 2002-12-25 09:46:32 -0600 |
|---|---|---|
| committer | Kai Germaschewski <kai@tp1.ruhr-uni-bochum.de> | 2002-12-25 09:46:32 -0600 |
| commit | fccef669d1d489d675fd6a8ae5fb87cac72a54d6 (patch) | |
| tree | 2593647c42aa2ece907411e46de79d3ea72367ec /include/linux | |
| parent | a70441972d23b7165fe1f41a7925c4b3dea11f5f (diff) | |
kbuild: Stem compression for kallsyms
This patch implements simple stem compression for the kallsyms symbol
table. Each symbol has as first byte a count on how many characters
are identical to the previous symbol. This compresses the often
common repetive prefixes (like subsys_) fairly effectively.
On a fairly full featured monolithic i386 kernel this saves about 60k in
the kallsyms symbol table.
The changes are very simple, so the 60k are not shabby.
One visible change is that the caller of kallsyms_lookup has to pass in
a buffer now, because it has to be modified. I added an arbitary
127 character limit to it.
Still >210k left in the symbol table unfortunately. Another idea would be to
delta encode the addresses in 16bits (functions are all likely to be smaller
than 64K). This would especially help on 64bit hosts. Not done yet, however.
No, before someone asks, I don't want to use zlib for that. Far too fragile
during an oops and overkill too and it would require to link it into all
kernels.
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/kallsyms.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/kallsyms.h b/include/linux/kallsyms.h index dcba85045308..d2a90b7766a1 100644 --- a/include/linux/kallsyms.h +++ b/include/linux/kallsyms.h @@ -12,7 +12,7 @@ const char *kallsyms_lookup(unsigned long addr, unsigned long *symbolsize, unsigned long *offset, - char **modname); + char **modname, char *namebuf); /* Replace "%s" in format with address, if found */ extern void __print_symbol(const char *fmt, unsigned long address); @@ -22,7 +22,7 @@ extern void __print_symbol(const char *fmt, unsigned long address); static inline const char *kallsyms_lookup(unsigned long addr, unsigned long *symbolsize, unsigned long *offset, - char **modname) + char **modname, char *namebuf) { return NULL; } |
