I noticed that If I run strings
on my program which was compiled by g++
the output contains the names of various classes that it uses.
The program was compiled with -O3
and without -g
or -p
, and the class names are still present when I strip the binary.
I was wondering why it is necessary for g++
to store this information in the binary? The class names that are present all seem to be classes that use virtual functions, so I suspect this is something to do with it.
g++ -c blah.o blah.cpp
does not include class names until after linking it as an executable. – Parts