Brian:
Thanks for the reply - I appreciate it.
This much I knew. However! Let me rephrase my question. Suppose I
compile something with -finstrument-functions and don't supply my own
function. The linker must resolve it to something, so I assumed that
there is an empty function (e.g. a "ret" with a global label on it)
somewhere in the runtime library source; otherwise "ld" would barf. Is
this not the case, and the linker is just supplying that silently, or what?
The reason I ask is that a couple of years ago I instrumented blocks as
well. (I am guilty of not posting these to the GCC community.) So I also
have __cyg_profile_block as an additional extern. I wanted to supply a
"default, do nothing" function for this as well.
Thoughts? Thanks again.
Bill
Brian Dessent wrote:
Bill Mahoney wrote:
Hey, I would like to know on a new 4.3.2 install, where the source is
for the portion of the RT library that contains __cyg_profile_func_enter
/ _exit. Can somebody just email me back and aim me at the correct
file? I've find/grep'd until my fingers are tired.
The compiler will insert calls to those functions when you use
-finstrument-functions but you are meant to provide an implementation of
them in your own code to receive the data and process it as you wish.
So you won't find what you're looking for in gcc anywhere because it
doesn't exist.
Brian