[ELF][PPC64] Enable R_PPC64_REL14 trunks
authorFangrui Song <maskray@google.com>
Fri, 27 Mar 2020 04:20:13 +0000 (21:20 -0700)
committerFangrui Song <maskray@google.com>
Sat, 4 Apr 2020 17:59:17 +0000 (10:59 -0700)
commit9195b0191130a8d5f1751f60b3489782ca5dc315
tree7e0831556cace0b7b93e343024f7657e88e24dfc
parenta13212582a901beb57f9c041df68c7b34eef0524
[ELF][PPC64] Enable R_PPC64_REL14 trunks

The thunk implementation is available but an assertion disallows it.
Linux kernel has such a use case: in arch/powerpc/kernel/exceptions-64s.S:handle_page_fault,
beq+ ret_from_except_lite may get out of range.

Link: https://github.com/ClangBuiltLinux/linux/issues/951
Differential Revision: https://reviews.llvm.org/D76904
lld/ELF/Thunks.cpp
lld/test/ELF/ppc64-long-branch-rel14.s [new file with mode: 0644]