How to remove the executable class name without losing dynamic_cast?

0

My goal is to just remove the executable classes name, but still continue with the ability to use dynamic_cast . The problem is that if RTTI is removed, and thus the class names, there is no substitute for dynamic_cast .

I have tried to build an alternative system to RTTI by storing the class information in a static variable, but I do not know how to convert the pointers correctly, especially when facing the "diamond problem". And, on top of that, it could give some problem in libs I use (SDL, GLFW, etc.).

The compiler I use is Min-GW, and not even -s or strip removes this type of data.

I'm desperate looking for some way to do this, even if it's directly replacing the class names in .exe generated by empty strings.

    
asked by anonymous 10.01.2017 / 16:30

1 answer

0

There is no established way to do it in Min-GW, because you want to use a language function by removing the assumptions on which it is based.

dynamic_cast requires RTTI, which embeds the classes name in the executable.

Subsequent processes of obfuscation or alternative compilers with this perhaps concern exist, but in this case it is already out of the scope of the C ++ language.

    
11.01.2017 / 18:48