title: How do I hide C++ RTTI symbols?
body: <p>Is there some easy/repeatable way to scramble RTTI symbols?</p>
  
  <p>Some things that have already been done:</p>
  
  <ul>
  <li><p>static build -- Obviously this helps a lot as things get inlined between libraries and there is no clean interface like with a dynamic library. We want to do this in any case b/c the library works cross platform and this makes deployment a lot easier (just one fat library file)</p></li>
  <li><p>using "strip" -- At least on Linux (not sure if there is a Windows equivalent!) this will remove a good part of the symbols left floating around</p></li>
  </ul>
  
  <p>However if I run "strings" on the library I can still see human readable symbols! After some investigating it seems like this is due to RTTI. All existing compilers seem to just use the function/class/etc. signature to generate the RTTI comparison values in code. This in-effect leaks source into the binary and gives the curious user insight into our secret sauce and how we make it.</p>
  
  <p>Note: </p>
  
  <ul>
  <li><p>We can't build with -fno-rtti b/c the statically linked libraries we use are using RTTI internally. I think what I'm looking for is something that will work on the compiled executable, and not as part of the build process</p></li>
  <li><p>I've tried to do find a commercial product that will do this - but none list it in their feature list. A lot of the products seem to have questionable quality or are in some semi-abandoned state. Most seem to focus on scrambling the code and do all sorts of complicated transformation that hurt performance and aren't super critical for us.</p></li>
  <li><p>Manually scrambling all the symbols in all the libraries we use would do the trick.. but it seems like a maintainability nightmare...</p></li>
  </ul>