I want to strip my binary in a way where certain function names are retained since the binary is a shared library and all other function names are stripped from the symbol table.
Using the -g
switch removes all debug information which is great but that does not include the function names.
If I use --s --wildcard --keep-symbol="blabla_*" --keep-symbol="*blabla*" ...
it still strips too much and breaks compatibility.
Is there any way to just remove function names from the symbol table? I considered rewriting the function names in the ELF
with an ELF parser
but it's more tedious than it should be since it seems to be a common enough use case to be either supported by the strip
command or something else "standardized".