[ELF][PPC64] Don't apply LD->LE relaxation on R_PPC64_GOT_DTPREL16*
authorFangrui Song <maskray@google.com>
Mon, 3 Jun 2019 05:41:31 +0000 (05:41 +0000)
committerFangrui Song <maskray@google.com>
Mon, 3 Jun 2019 05:41:31 +0000 (05:41 +0000)
commitce1534b4055d52e007aff99dee521f6b7a7dba44
tree59f78122fa7d6fe32d4d4ca4087b4be27be7872a
parentabb7484c31d5346c5f7b06fb65549b0fef75dccf
[ELF][PPC64] Don't apply LD->LE relaxation on R_PPC64_GOT_DTPREL16*

In ELF v2 ABI, R_PPC64_GOT_DTPREL16* are not relaxed.

This family of relocation types are used for variables outside of 2GiB
of the TLS block. 2 instructions cannot materialize a DTPREL offset that
is not 32-bit.

Reviewed By: ruiu

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

llvm-svn: 362357
lld/ELF/Arch/PPC64.cpp
lld/ELF/Relocations.cpp
lld/test/ELF/ppc64-dtprel.s
lld/test/ELF/ppc64-ld-got-dtprel.s [new file with mode: 0644]