Xref: utzoo comp.unix.wizards:26166 alt.sys.sun:4390 Path: utzoo!utgpu!cs.utexas.edu!swrinde!elroy.jpl.nasa.gov!usc!rpi!think.com!spool.mu.edu!uunet!mcsun!hp4nl!and!jos From: jos@and.nl (J. Horsmeier) Newsgroups: comp.unix.wizards,alt.sys.sun Subject: Re: Prof'ing a program ... what the hell is mcount? Message-ID: <999@baby.and.nl> Date: 27 Jun 91 13:41:27 GMT References: Followup-To: comp.unix.wizards Organization: AND Software BV Rotterdam Lines: 37 In article cluther@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 . > >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@and.nl O| |O--------------------------------------------------------------------O| |O I am a Hamburger (F. Zappa 1974) O| +----------------------------------------------------------------------+