[PATCH] D54314: [ELF] - Fix R_AARCH64_ADR_GOT_PAGE, R_AARCH64_LD64_GOT_LO12 handling against IFUNC symbols.

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 13 02:26:16 PST 2018


grimar added inline comments.


================
Comment at: ELF/InputSection.cpp:627
   case R_GOT_PAGE_PC:
+  case R_GOT_PAGE_PC_PLT:
   case R_RELAX_TLS_GD_TO_IE_PAGE_PC:
----------------
ruiu wrote:
> grimar wrote:
> > ruiu wrote:
> > > grimar wrote:
> > > > ruiu wrote:
> > > > > this is? It seems a bit weird.
> > > > That is because AArch64 use 2 relocations at the same time:
> > > > 
> > > > ```
> > > >  adrp x8, :got:myfunc               # R_AARCH64_ADR_GOT_PAGE
> > > >  ldr  x8, [x8, :got_lo12:myfunc] # R_AARCH64_LD64_GOT_LO12
> > > > ```
> > > > 
> > > > `R_AARCH64_ADR_GOT_PAGE` has `R_GOT_PAGE_PC` expression and
> > > > `R_AARCH64_LD64_GOT_LO12` has `R_GOT` initially and then
> > > > converted to `*_PLT` expressions with 'toPlt()'
> > > > 
> > > > 
> > > I mean this is actually AArch64 specific, no? It clearly uses `getAarch64Page`. It should be named R_AARCH64_*.
> > Probably. Then `R_GOT_PAGE_PC` should also be renamed. I was consistent and only added a suffix `_PLT`.
> Can you rename them in another patch?
Done in https://reviews.llvm.org/rLLD346749.


https://reviews.llvm.org/D54314





More information about the llvm-commits mailing list