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

Peter Smith via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 31 07:24:52 PST 2019


peter.smith added a comment.

Thanks for the update. I'll be able to take a look at this in detail next week.



================
Comment at: lld/ELF/InputSection.cpp:613
     return Sym.getVA(A) - getARMStaticBase(Sym);
   case R_GOT:
   case R_RELAX_TLS_GD_TO_IE_ABS:
----------------
pcc wrote:
> peter.smith wrote:
> > I think that the only use for the _PLT RelType is for redirection to ifunc PLT entries, you might be able to get rid of them from Relocations.h. 
> It looks like `R_PLT` is still used for `R_MICROMIPS_26_S1`. I was able to remove `R_AARCH64_PLT_PAGE_PC`, though, by noting that the only remaining caller of `toPlt` is now in the thunk creation code which I believe operates on relocations that were relaxed by `fromPlt`.
> 
> By the way, if I comment out that call to `toPlt`, all the tests still pass. We might want to add a test for that code.
I'll add a test case next week. It may be possible to simplify toPlt as thunks should only use a subset of the expressions.


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