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

Peter Collingbourne via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 5 19:06:25 PST 2019


pcc marked 5 inline comments as done.
pcc added a comment.

Thanks for the review. I've tested this using statically linked executables on Android on both AArch64 (with ifuncs in hwasan) and ARM (with ifuncs in libc.a).

@emaste do you know how I can test this on FreeBSD?



================
Comment at: lld/test/ELF/gnu-ifunc-canon.s:2
+// REQUIRES: x86
+// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o
+// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %S/Inputs/gnu-ifunc-canon1.s -o %t1.o
----------------
peter.smith wrote:
> I found it difficult to track the inputs from the outputs. For example it is easy to lose the type of reference from %t1.o, %t2.o and %t3.o. For example %t1.o has a RO pc-relative reference, %t2.o has a RO absolute reference and %t3.o has a RW  absolute + offset reference.  Maybe worth using %t-ro-pcrel.o etc.
> 
> Alternatively a comment above each ld.lld invocation with a description of the inputs, for example non-got-generating reference, expect canonical PLT.
> 
> I've not had a chance to check through each case yet. Will do that tomorrow and will post if I find any problems.  
I've renamed the files.


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