forked from OSchip/llvm-project
87bbd5ffd4
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 |
||
---|---|---|
.. | ||
abs.s | ||
allow-multiple-definition.s | ||
allow-shlib-undefined.s | ||
archive.s | ||
archive2.s | ||
archive3.s | ||
archive4.s | ||
comdat.s | ||
common.s | ||
dynamic-reloc.s | ||
invalid-binding.elf | ||
invalid-data-encoding.a | ||
invalid-file-class.a | ||
invalid-section-index.elf | ||
invalid-shstrndx.so | ||
invalid-symtab-sh_info.elf | ||
libsearch-dyn.s | ||
libsearch-st.s | ||
no-symtab.o | ||
resolution.s | ||
shared-ppc64.s | ||
shared.s | ||
shared2.s | ||
shared3.s | ||
tls-mismatch.s | ||
visibility.s | ||
whole-archive.s |