> Yes. Instead of a direct call, load the fptr for _mcount and do an > indirect call. That'll avoid the dynamic linker. You can conditionalize > this on cfun->static_chain_decl to avoid the extra work when nested > functions aren't involved.
Ah! yes, of course, writing the stub by hand. This completely escaped me. > Also, technically fptrs (and thus dynamic linking) isn't used when either > TARGET_NO_PIC or TARGET_AUTO_PIC are set. Of course, I wouldn't expect > nested functions to be used here either, but... I don't expect Ada to be used in that cases either, but who knows. ;-) Thanks for your decisive help. -- Eric Botcazou