MacOs 10.6, if I have a file \"unwanted.c\" which contains:
class secret_thing {
public:
secret_thing() {}
void revealing_method_name() {}
};
main()
{
s
Using the following compile line I successfully strip the symbols from the executable:
$ g++ -Xlinker -unexported_symbol -Xlinker "*" -o executable file.cpp
$ strip executable
Given the latest sample file, this results in:
$ nm executable
U __ZTVN10__cxxabiv117__class_type_infoE
U __ZTVN10__cxxabiv120__si_class_type_infoE
U __ZdlPv
U __Znwm
U ___cxa_pure_virtual
U ___gxx_personality_v0
0000000100000000 A __mh_execute_header
U _exit
U dyld_stub_binder