In my C++ program, how can I detect programmatically at runtime whether symbols have been stripped via the 'strip' gnu development tool on Linux?
I'd like a function definition which returns true if stripped, otherwise false.
Would using dlsym() on "main()" work to detect this reliably?
I know the
file
command can tell the difference, so you could possibly look at its source to see what mechanism it uses.