#include "gprof.h"
+#ifndef FOPEN_RB
+#define FOPEN_RB "r"
+#endif
+
bfd *abfd;
char *whoami;
struct rawhdr raw;
FILE *pfile;
- if((pfile = fopen(filename, "r")) == NULL) {
+ if((pfile = fopen(filename, FOPEN_RB)) == NULL) {
perror(filename);
done();
}
* Perhaps it should be made configurable.
*/
- if (symprefix && symprefix != *symp->name)
+ if (symprefix && symprefix != *symp->name
+ /* Gcc may add special symbols to help gdb figure out the file
+ language. We want to ignore these, since sometimes they
+ mask the real function. (dj@ctron) */
+ || !strncmp (symp->name, "__gnu_compiled", 14))
return FALSE;
return TRUE;