Prof'ing a program ... what the hell is mcount?
J. Horsmeier
jos at and.nl
Thu Jun 27 23:41:27 AEST 1991
In article <cluther.677370644 at sonne> cluther at sonne.cnns.unt.edu (Clay Luther) writes:
>I am trying to prof a program under SunOS 4.1.1, using cc -p. At link, the
>loader complains "mcount undefined."
>
>Which lib is mcount defined in? I have included <prof.h>.
>
>It, of course, works just fine w/o the -p option.
Hi there,
what actually do you do? If you do something like:
cc -c -p anyname.c
cc anyname.o
things go wrong, because ld needs to resolve symbol `mcount'
but can't find it. You need /usr/lib/mcrt0.o.
Better still, use:
cc -p anyname.o
it automatically includes this lib. (-p flag)
read cc(1), prof(1), monitor(3).
See ya!
Jos
+----------------------------------------------------------------------+
|O J.A. Horsmeier AND Software B.V. phone : +31 10 4367100 O|
|O Westersingel 106/108 fax : +31 10 4367110 O|
|O 3015 LD Rotterdam NL e-mail: jos at and.nl O|
|O--------------------------------------------------------------------O|
|O I am a Hamburger (F. Zappa 1974) O|
+----------------------------------------------------------------------+
More information about the Comp.unix.wizards
mailing list