[PATCH] D57371: ELF: Allow GOT relocs pointing to non-preemptable ifunc to resolve to an IRELATIVE where possible.

Mark Johnston via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Feb 10 20:30:22 PST 2019


markj added a comment.

In D57371#1389410 <https://reviews.llvm.org/D57371#1389410>, @pcc wrote:

> I tested this patch by linking FreeBSD userspace with it and running their test suite [1], and there were no regressions. However, it appears that only a handful of userspace functions are using ifunc. The kernel uses more, but I couldn't test this on the kernel because they use a custom flag `-z ifunc-noplt` to link their kernel and this flag isn't implemented in upstream lld. In order to test this on the kernel the patch implementing the flag would need to be rebased on top of this change, and that's probably beyond the limit of what's reasonable to test here.


For the purpose of testing it is possible to remove this flag without ill effect.

I built lld from git and built a kernel with this diff applied and -zifunc-noplt removed from the kernel; didn't have any problems booting. I ported the -zifunc-noplt patch and was able to boot with that flag enabled too. Note that the kernel doesn't have any non-preemptible ifuncs, though.


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D57371/new/

https://reviews.llvm.org/D57371





More information about the llvm-commits mailing list