https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119386

--- Comment #55 from Michael Matz <matz at gcc dot gnu.org> ---
Yes, %r11 may be clobbered by the lazy stub, nothing else will be changed by
the
PLT.  Even that shouldn't matter, though, in this case.  Of course, the very
fact
that the PLT was never used in the past years, until recently, might mean that
there's code in the wild that relies on not even %r11 being clobbered by the
mcount sequence.  I highly doubt that, though.

Of course we also wouldn't loose much to just stay with the 'call
*mcount@GOTPCREL(%rip)', because that is what the first instruction in the PLT
sequence would be doing anyway (just with s/call/jmp/).

I personally would say, when -fpic: just go via PLT, unless -mno-plt (then via
*mcount@GOTPCREL).  No other conditions.

Reply via email to