I don't know whether this is a genuine bug, or something that the manual doesn't
explain (it doesn't) but I see:

$ gcc -pg -g -c main.c
$ gcc -o a.out main.o -pg
$ ./a.out
$ gprof
gprof: gmon.out file is missing call-graph data
$

If I then add '-static' to the second gcc, all is well. (The contents of main.c
seem to be irrelevant.)

-- 
           Summary: Why is gcc -static required to avoid "gprof: gmon.out
                    file is missing call-graph data" error?
           Product: binutils
           Version: 2.15
            Status: NEW
          Severity: normal
          Priority: P2
         Component: binutils
        AssignedTo: unassigned at sources dot redhat dot com
        ReportedBy: john at cs dot york dot ac dot uk
                CC: bug-binutils at gnu dot org,john at cs dot york dot ac
                    dot uk


http://sources.redhat.com/bugzilla/show_bug.cgi?id=829

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.

_______________________________________________
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils

Reply via email to