c++ - Why does g++ store class names in the compiled binary? -
i noticed if run strings
on program compiled g++
output contains names of various classes uses.
the program compiled -o3
, without -g
or -p
, , class names still present when strip binary.
i wondering why necessary g++
store information in binary? class names present seem classes use virtual functions, suspect it.
this might have rtti, specifically, rtti allows query name of class of given variable. see typeid keyword. if case explain why happens classes have virtual functions - rtti works classes virtual functions.
Comments
Post a Comment