Is it possible to check if given program was compiled with GNU gprof instrumentation, i.e. with '-pg' flag passed to both compiler and linker, without running it to check if it would generate a
You could check for references to function
The above works on a quick test here.
The regular expression in the answer above doesn't always work...but the general idea of grepping for "mcount" in the output of 'readelf -s [binary]' is correct, I think