[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 01:17: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:
> 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()'




https://reviews.llvm.org/D54314





More information about the llvm-commits mailing list