[llvm-dev] [lld] avoid emitting PLT entries for ifuncs

Joerg Sonnenberger via llvm-dev llvm-dev at lists.llvm.org
Tue Aug 21 14:14:02 PDT 2018


On Tue, Aug 21, 2018 at 09:47:41AM -0400, Mark Johnston via llvm-dev wrote:
> We've recently started using ifuncs in the x86(_64) FreeBSD kernel.
> Currently lld will emit a PLT entry for each ifunc, so ifunc calls are
> more expensive that those of regular functions.

If you rewrite the PLT entry to be a plain jump whenever possible, the
difference should be pretty small. Have you considered that?

Joerg


More information about the llvm-dev mailing list