llvm-project/lld/test/elf2/Inputs
Hal Finkel 87bbd5ffd4 [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
2015-10-12 21:19:18 +00:00
..
abs.s [elf2] Add error checking for the R_X86_64_32 relocation. 2015-09-15 23:36:30 +00:00
allow-multiple-definition.s Implement --allow-multiple-definition. 2015-09-28 20:30:11 +00:00
allow-shlib-undefined.s Remove trailing whitespaces. 2015-10-01 17:33:36 +00:00
archive.s [elf2] Add basic archive file support. 2015-09-04 22:28:10 +00:00
archive2.s Weak undefined symbols should not fetch archive members. 2015-10-02 17:41:22 +00:00
archive3.s Handle strong undefined symbols fetching members after a weak undefined. 2015-10-06 14:33:58 +00:00
archive4.s Handle strong undefined symbols fetching members after a weak undefined. 2015-10-06 14:33:58 +00:00
comdat.s Add support for comdats. 2015-10-09 19:25:07 +00:00
common.s Remember the maximum alignment used to refer to a common symbol. 2015-09-01 01:19:12 +00:00
dynamic-reloc.s Don't include fully resolved relocations in the dynamic relocation table. 2015-09-28 20:18:40 +00:00
invalid-binding.elf Add support for weak symbols. 2015-08-11 17:33:02 +00:00
invalid-data-encoding.a Update test to use invalid elf file in archives. 2015-09-29 18:44:18 +00:00
invalid-file-class.a Update test to use invalid elf file in archives. 2015-09-29 18:44:18 +00:00
invalid-section-index.elf Diagnose symbols with invalid section indexes. 2015-08-24 22:00:25 +00:00
invalid-shstrndx.so Add a test covering ELFFile's constructor failing. 2015-09-24 14:55:25 +00:00
invalid-symtab-sh_info.elf
libsearch-dyn.s Add support for -L and -l command line switches. 2015-09-28 12:52:21 +00:00
libsearch-st.s Add support for -L and -l command line switches. 2015-09-28 12:52:21 +00:00
no-symtab.o Don't crash on files with no symbol table. 2015-10-01 20:26:37 +00:00
resolution.s Turn resolution.s into an exhaustive testcase. 2015-08-30 23:17:30 +00:00
shared-ppc64.s [ELF2] Allow PPC64 to add the TOC-restore after .plt-based relocations 2015-10-12 21:19:18 +00:00
shared.s Start adding support for creating shared libraries. 2015-09-11 22:42:45 +00:00
shared2.s ELF2: Implement --as-needed. 2015-10-11 20:59:12 +00:00
shared3.s ELF2: Implement --as-needed. 2015-10-11 20:59:12 +00:00
tls-mismatch.s [ELF2] Check for TLS mismatch in symbol resolution. 2015-10-09 09:58:39 +00:00
visibility.s Merge visibility from all symbols with the same name. 2015-09-01 23:12:52 +00:00
whole-archive.s [ELF2] Add --[no-]whole-archive command line switches 2015-10-01 18:02:21 +00:00