freebsd-dev/libexec/rtld-elf
John Baldwin b4e9a36bf7 Handle relocations for newer non-PIC MIPS ABI.
Newer binutils supports extensions to the MIPS ABI for non-PIC code
that is used when compiling O32 binaries with clang 5 (but not used
for N64 oddly enough).  These extensions require support for
R_MIPS_COPY relocations as well as a second PLT GOT using
R_MIPS_JUMP_SLOT relocations.

For R_MIPS_COPY, use the same approach as on other architectures where
fixups are deferred to the MD do_copy_relocations.

The additional PLT GOT for jump slots is located in a .got.plt section
which is identified by a DT_MIPS_PLTGOT dynamic entry.  This GOT also
requires fixups for the first two GOT entries just as the normal GOT.
However, the entry point for this second GOT uses a different calling
convention. Rather than passing an offset into the GOT, it passes an
offset into the .rel.plt section.  This requires a second entry point
(_rtld_pltbind_start) which calls the normal _rtld_bind() rather than
_mips_rtld_bind().  This also means providing a real version of
reloc_jmpslot() which is used by _rtld_bind().

In addition, add real implementions of reloc_plt() and
reloc_jmpslots() which walk .rel.plt handling R_MIPS_JUMP_SLOT
relocations.

Reviewed by:	kib
Sponsored by:	DARPA / AFRL
Differential Revision:	https://reviews.freebsd.org/D12326
2017-09-12 17:46:30 +00:00
..
aarch64
amd64
arm End softfp->hardfp transition period for arm 2017-09-12 17:06:35 +00:00
i386
mips Handle relocations for newer non-PIC MIPS ABI. 2017-09-12 17:46:30 +00:00
powerpc rtld: fix warnings about redundant declarations 2017-05-26 15:55:03 +00:00
powerpc64 rtld: fix warnings about redundant declarations 2017-05-26 15:55:03 +00:00
riscv Support for v1.10 (latest) of RISC-V privilege specification. 2017-08-10 14:18:09 +00:00
sparc64
tests
debug.c
debug.h
libmap.c
libmap.h
Makefile Compile reloc.o with -fno-jump-tables on MIPS. 2017-08-30 20:00:15 +00:00
Makefile.depend
malloc.c
map_object.c Use address space guard to implement inter-segment gap. 2017-06-24 17:04:27 +00:00
paths.h
rtld_lock.c
rtld_lock.h
rtld_printf.c
rtld_printf.h
rtld_tls.h
rtld_utrace.h
rtld.1 Add serial comma. 2017-09-01 16:56:37 +00:00
rtld.c Handle relocations for newer non-PIC MIPS ABI. 2017-09-12 17:46:30 +00:00
rtld.h Handle relocations for newer non-PIC MIPS ABI. 2017-09-12 17:46:30 +00:00
Symbol.map
xmalloc.c