Sourceware Bugzilla – Bug 14108
symbase in elf_slurp_symbol_table memory waste
Last modified: 2012-05-14 17:05:06 UTC
It is not possible for the caller of bfd_canonicalize_symtab to free the "symbase" object allocated by elf_slurp_symbol_table (bfd/elfcode.h).
The memory isn't wasted per se, it will be freed when the bfd is freed.
However, GDB has no need to keep it (at least for normal syms, there's a comment in gdb/elfread.c about needing to keep dynamic syms, not sure it's still valid or if it applies here). In large apps it can be a significant waste of memory (e.g. 100's of MB).