[ELF][AArch64] Add missing PLT relocations to isStaticLinkTimeConstant
authorPeter Smith <peter.smith@linaro.org>
Tue, 15 Jan 2019 11:17:03 +0000 (11:17 +0000)
committerPeter Smith <peter.smith@linaro.org>
Tue, 15 Jan 2019 11:17:03 +0000 (11:17 +0000)
commitb20f993df887ee5f478a4eedd349e41f0a305d1a
treeabd4364804a3297d9e1c2970c66c8f9d7a75d2c0
parentf8a0e0ddf025802969db71d71b8bf180a9aed0a9
[ELF][AArch64] Add missing PLT relocations to isStaticLinkTimeConstant

r347650 fixed pr38074 for AArch64 for static linking. It added two new
RelExpr instances R_AARCH64_GOT_PAGE_PC_PLT and R_GOT_PLT. These need to be
added to isStaticLinkTimeConstant so that the address of an ifunc can be
taken when building a shared library.

fixes pr40250

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

llvm-svn: 351186
lld/ELF/Relocations.cpp
lld/test/ELF/aarch64-gnu-ifunc-address.s [new file with mode: 0644]