Is there any way to postprocess a DLL and its .lib file to remove symbols that I do not want within them?
Background:
The DLL's code uses boost::serialization, which dllexports (many many) symbols. Apparently this is so as to cause the linker not to omit static objects that are unreferenced but have important side effects when initialized.
However, I'd very much prefer that there be no hint of boost within the DLL's exported symbols.
I reason that since the link step has completed that it would be safe to remove the mess in the symbol table caused by the library.
Hence, I am wondering if there exists some tool to accomplish this.
I don't know a tool that does this, but here is a piece of C++ code you can build that can change a DLL exported names. In this case, you can set the names you don't want to an empty string (the 0 character):
It's more some kind of obfuscation but removing names completely is more complex since it requires a full consistent rewrite of the exports section.