HomePhabricator

[AArch64] Fix resolution of R_PLT_PAGE RelExpr

Description

[AArch64] Fix resolution of R_PLT_PAGE RelExpr

The R_AARCH64_ADR_PREL_PG_HI21 relocation type is given the R_PAGE_PC
RelExpr. This can be transformed to R_PLT_PAGE_PC via toPlt().
Unfortunately the resolution is identical to R_PAGE_PC so instead of
getting the address of the PLT entry we get the address of the symbol
which may not be correct in the case of static ifuncs. The fix is to
handle the cases separately and use getPltVA() + A with R_PLT_PAGE_PC.

Differential Revision: https://reviews.llvm.org/D54474

Details

Committed
psmithNov 14 2018, 5:53 AM
Differential Revision
D54474: [LLD][AArch64] Fix resolution of R_PLT_PAGE RelExpr
Branches
Unknown
Tags
Unknown