This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Help Soon!


> > 	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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]