bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gcc -profile never finishes linking


From: Hans-Bernhard Broeker
Subject: Re: gcc -profile never finishes linking
Date: 25 Apr 2001 11:56:59 GMT

Eli Zaretskii <address@hidden> wrote:

> Where does one learn about -profile, how is it different from -pg, and 
> why is it a good idea to deprecate it?  

AFAIK, "-profile" is a Linux-ism. So there's no surprise it's not
mentioned in the GCC docs.

For compiling, -profile is identical to -p (and that in turn is
identical to -pg). The difference is at link time, as can be seen in
the specs file:

*lib:
%{shared: -lc --version-script libgcc.map%s}    %{!shared: %{mieee-fp:-lieee} 
  %{pthread:-lpthread}      %{profile:-lc_p} %{!profile: -lc}}

I.e. -profile tries to actually link with the profiling version of
libc, libc_p.  That's necessary if you want to account for all of the
time spent by the application.  Linking to -lc instead of -lc_p causes
all time spent in libc functions to be invisible to the profiler.

-- 
Hans-Bernhard Broeker (address@hidden)
Even if all the snow were burnt, ashes would remain.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]