diff options
author | Hal Finkel <hfinkel@anl.gov> | 2015-10-12 21:19:18 +0000 |
---|---|---|
committer | Hal Finkel <hfinkel@anl.gov> | 2015-10-12 21:19:18 +0000 |
commit | 87bbd5ffd447529559dd76d2f2bdaad5e5e586a3 (patch) | |
tree | 949f27cddc90ab5184f3ca01ed37f0618f8957f9 /lldb/source/Plugins/ScriptInterpreter/Python/lldb-python.h | |
parent | cf58b6a48c77ffd048aea2a8e45a39c02f4a9bbf (diff) | |
download | bcm5719-llvm-87bbd5ffd447529559dd76d2f2bdaad5e5e586a3.tar.gz bcm5719-llvm-87bbd5ffd447529559dd76d2f2bdaad5e5e586a3.zip |
[ELF2] Allow PPC64 to add the TOC-restore after .plt-based relocations
Under the PPC64 ELF ABI, functions that might call into other modules (and,
thus, need to load a different TOC base value into %r2), need to restore the
old value after the call. The old value is saved by the .plt code, and the
caller only needs to include a nop instruction after the call, which the linker
will transform into a TOC restore if necessary.
In order to do this the relocation handler needs two things:
1. It needs to know whether the call instruction it is modifying is targeting
a .plt stub that will load a new TOC base value (necessitating a restore after
the call).
2. It needs to know where the buffer ends, so that it does not accidentally
run off the end of the buffer when looking for the 'nop' instruction after the
call.
Given these two pieces of information, we can insert the restore instruction in
place of the following nop when necessary.
llvm-svn: 250110
Diffstat (limited to 'lldb/source/Plugins/ScriptInterpreter/Python/lldb-python.h')
0 files changed, 0 insertions, 0 deletions