Hugh Sasse wrote:
>> Eventually I might do that. I'll be testing the "-g" without "-pg" at some
>> point, but I don't plan to try the other optimization levels. So if it goes
>> away when "-pg" is removed, that pretty much nails the thing down.
> 
> OK, thought it might be scripted and easy to run over night.

Well -- removing "-pg" left the issue in place, so it's something to do 
with the lack of optimization. At that point I slapped my forehead, 
etc., and said, "Hey, Ed! You compiled this thing with debug mode, why 
not run it under the debugger and see wtf it's doing?"

But I haven't done that yet. :)

>> It the profiling library start routine in binutils or in the C libraries?
> 
> I can't parse that sentence :-).  I googled for 
> gnu gprof site:gnu.org
> or similar, and it pointed to binutils, so I grabbed the latest to see
> if the ChangeLogs noted anything.   I've not looked in GNU C libraries
> of any kind (glibc?).

Sorry about that. The way profiling works is that when you compile, it 
inserts profiling code into the object files. When you link, you replace 
the standard startup routine ("crt.o"?) with a profiling startup routine 
("gcrt.o"?). I think the startup routines live in the gcc package, not 
in the binutils package. "gprof" itself lives in the binutils package. 
But ... since it's not associated with profiling (-pg), that doesn't matter.