[PATCH] D91983: [PowerPC] Fix missing nop after call to weak callee.
Stefan Pintilie via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 23 10:54:07 PST 2020
stefanp created this revision.
stefanp added reviewers: nemanjai, NeHuang, lei.
Herald added subscribers: shchenz, kbarton, hiraditya.
Herald added a project: LLVM.
stefanp requested review of this revision.
Weak functions can be replaced by other functions at link time. Previously it
was assumed that no matter what the weak callee function was replaced with it
would still share the same TOC as the caller. This is no longer true as a weak
callee with a TOC setup can be replaced by another function that was compiled
with PC Relative and does not have a TOC at all.
This patch makes sure that all calls to functions defined as weak from a caller
that has a valid TOC have a nop after the call to allow a place for the linker
to restore the TOC.
rG LLVM Github Monorepo
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 7067 bytes
Desc: not available
More information about the llvm-commits