OSDN Git Service

[PowerPC] Implement R_PPC64_REL24_NOTOC local calls, callee requires a TOC
authorVictor Huang <wei.huang@ibm.com>
Mon, 20 Jul 2020 17:40:41 +0000 (17:40 +0000)
committerVictor Huang <wei.huang@ibm.com>
Mon, 20 Jul 2020 17:46:49 +0000 (17:46 +0000)
commit91cce1a2bc346f9fec5284f777b404dafad5ff3c
treeb90280d14960b6d20ba4b2cea49b83a04675cf19
parent3a108ab256dba7b5a7304f0e83818673d334405f
[PowerPC] Implement R_PPC64_REL24_NOTOC local calls, callee requires a TOC

The PC Relative code now allows for calls that are marked with the relocation
R_PPC64_REL24_NOTOC. This indicates that the caller does not have a valid TOC
pointer in R2 and does not require R2 to be restored after the call.

This patch is added to support local calls to callees that require a TOC

Reviewed By: sfertile, MaskRay, nemanjai, stefanp

Differential Revision: https://reviews.llvm.org/D83504
lld/ELF/Arch/PPC64.cpp
lld/ELF/Target.h
lld/ELF/Thunks.cpp
lld/test/ELF/ppc64-pcrel-call-to-toc.s [new file with mode: 0644]
llvm/include/llvm/Object/ELF.h