summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test/expression_command/call-function/TestCallBuiltinFunction.py
diff options
context:
space:
mode:
authorFangrui Song <maskray@google.com>2019-05-14 15:25:21 +0000
committerFangrui Song <maskray@google.com>2019-05-14 15:25:21 +0000
commite041d15f5e326f7ee0b1ea9c7a988f8965ce7e6a (patch)
tree4e607a5c8b473feefa13b8dc499d1413c3dcb782 /lldb/packages/Python/lldbsuite/test/expression_command/call-function/TestCallBuiltinFunction.py
parentc2d9cfd9250d93ec4e1785a8eabbf40eaa245b6a (diff)
downloadbcm5719-llvm-e041d15f5e326f7ee0b1ea9c7a988f8965ce7e6a.tar.gz
bcm5719-llvm-e041d15f5e326f7ee0b1ea9c7a988f8965ce7e6a.zip
[LLD][ELF] Add the -z ifunc-noplt option
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
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/expression_command/call-function/TestCallBuiltinFunction.py')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud