This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Help Soon!
- To: meggie dot yang at intel dot com
- Subject: Re: Help Soon!
- From: "Martin v. Loewis" <martin at mira dot isdn dot cs dot tu-berlin dot de>
- Date: Sun, 28 Nov 1999 22:29:10 +0100
- CC: gcc at gcc dot gnu dot org
- References: <A577A8CE35DBD211AC3F00A0C9E011540FFFDA@BJSMSX90>
> > Now i am studying gprof. I'm interested gmon.c file. But i don't know where can i find the mcount function.Which describe following:
> > extern mcount() asm ("mcount");
> > What's meaning?
This is only a declaration. It declares that the name of the function,
on assembler level, is "mcount" (rather than "_mcount", or
"mcount__Fv"). This is because the compiler, internally, generates
calls to mcount, and it has to use the correct spelling there.
If you have such a declaration, you still have to have a definition.
> > Why there is another mcount function in the file?
That is the definition.
Hope this helps,
Martin