[PATCH] D61613: [LLD][ELF] Add the -z ifunc-noplt option
Mark Johnston via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon May 6 14:50:54 PDT 2019
markj created this revision.
Herald added subscribers: llvm-commits, MaskRay, krytarowski, arichardson, emaste.
Herald added a reviewer: espindola.
Herald added a project: LLVM.
markj edited the summary of this revision.
markj added reviewers: emaste, arichardson, ruiu, MaskRay.
This is intended for use in freestanding environments where text
relocations are acceptable. FreeBSD makes use of the option when
linking x86 kernels, which now make heavy use of ifuncs in hot paths.
Without the option, each ifunc results in the generation of a PLT entry,
so calls needlessly incur the extra overhead of an indirect jump. With
the option, ifunc calls have the same cost as ordinary function calls.
Test Plan:
I added a couple of regression tests and tested the FreeBSD kernel
build using the latest lld sources.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D61613
Files:
lld/ELF/Config.h
lld/ELF/Driver.cpp
lld/ELF/Relocations.cpp
lld/docs/ld.lld.1
lld/test/ELF/gnu-ifunc-noplt-i386.s
lld/test/ELF/gnu-ifunc-noplt.s
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D61613.198344.patch
Type: text/x-patch
Size: 8698 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190506/4f1da2d3/attachment.bin>
More information about the llvm-commits
mailing list