forked from OSchip/llvm-project
e041d15f5e
Patch by Mark Johnston! Summary: When the option is configured, ifunc calls do not go through the PLT; rather, they appear as regular function calls with relocations referencing the ifunc symbol, and the resolver is invoked when applying the relocation. This is intended for use in freestanding environments where text relocations are permissible and is incompatible with the -z text option. The option is motivated by ifunc usage in the FreeBSD kernel, where ifuncs are used to elide CPU feature flag bit checks in hot paths. Instead of replacing the cost of a branch with that of an indirect function call, the -z ifunc-noplt option is used to ensure that ifunc calls carry no hidden overhead relative to normal function calls. Test Plan: I added a couple of regression tests and tested the FreeBSD kernel build using the latest lld sources. To demonstrate the effects of the change, I used a micro-benchmark which results in frequent invocations of a FreeBSD kernel ifunc. The benchmark was run with and without IBRS enabled, and with and without -zifunc-noplt configured. The observed speedup is small and consistent, and is significantly larger with IBRS enabled: https://people.freebsd.org/~markj/ifunc-noplt/noibrs.txt https://people.freebsd.org/~markj/ifunc-noplt/ibrs.txt Reviewed By: ruiu, MaskRay Differential Revision: https://reviews.llvm.org/D61613 llvm-svn: 360685 |
||
---|---|---|
.. | ||
_static | ||
_templates | ||
llvm-theme | ||
AtomLLD.rst | ||
CMakeLists.txt | ||
Driver.rst | ||
NewLLD.rst | ||
README.txt | ||
Readers.rst | ||
ReleaseNotes.rst | ||
WebAssembly.rst | ||
conf.py | ||
design.rst | ||
development.rst | ||
getting_started.rst | ||
hello.png | ||
index.rst | ||
ld.lld.1 | ||
make.bat | ||
missingkeyfunction.rst | ||
open_projects.rst | ||
sphinx_intro.rst | ||
windows_support.rst |
README.txt
lld Documentation ================= The lld documentation is written using the Sphinx documentation generator. It is currently tested with Sphinx 1.1.3. We currently use the 'nature' theme and a Beaker inspired structure. See sphinx_intro.rst for more details.