glibc/sysdeps/tile
Alan Modra 0572433b5b PowerPC64 ELFv2 PPC64_OPT_LOCALENTRY
ELFv2 functions with localentry:0 are those with a single entry point,
ie. global entry == local entry, that have no requirement on r2 or
r12 and guarantee r2 is unchanged on return.  Such an external
function can be called via the PLT without saving r2 or restoring it
on return, avoiding a common load-hit-store for small functions.

This patch implements the ld.so changes necessary for this
optimization.  ld.so needs to check that an optimized plt call
sequence is in fact calling a function implemented with localentry:0,
end emit a fatal error otherwise.

The elf/testobj6.c change is to stop "error while loading shared
libraries: expected localentry:0 `preload'" when running
elf/preloadtest, which we'd get otherwise.

	* elf/elf.h (PPC64_OPT_LOCALENTRY): Define.
	* sysdeps/alpha/dl-machine.h (elf_machine_fixup_plt): Add
	refsym and sym parameters.  Adjust callers.
	* sysdeps/aarch64/dl-machine.h (elf_machine_fixup_plt): Likewise.
	* sysdeps/arm/dl-machine.h (elf_machine_fixup_plt): Likewise.
	* sysdeps/generic/dl-machine.h (elf_machine_fixup_plt): Likewise.
	* sysdeps/hppa/dl-machine.h (elf_machine_fixup_plt): Likewise.
	* sysdeps/i386/dl-machine.h (elf_machine_fixup_plt): Likewise.
	* sysdeps/ia64/dl-machine.h (elf_machine_fixup_plt): Likewise.
	* sysdeps/m68k/dl-machine.h (elf_machine_fixup_plt): Likewise.
	* sysdeps/microblaze/dl-machine.h (elf_machine_fixup_plt): Likewise.
	* sysdeps/mips/dl-machine.h (elf_machine_fixup_plt): Likewise.
	* sysdeps/nios2/dl-machine.h (elf_machine_fixup_plt): Likewise.
	* sysdeps/powerpc/powerpc32/dl-machine.h (elf_machine_fixup_plt):
	Likewise.
	* sysdeps/s390/s390-32/dl-machine.h (elf_machine_fixup_plt): Likewise.
	* sysdeps/s390/s390-64/dl-machine.h (elf_machine_fixup_plt): Likewise.
	* sysdeps/sh/dl-machine.h (elf_machine_fixup_plt): Likewise.
	* sysdeps/sparc/sparc32/dl-machine.h (elf_machine_fixup_plt): Likewise.
	* sysdeps/sparc/sparc64/dl-machine.h (elf_machine_fixup_plt): Likewise.
	* sysdeps/tile/dl-machine.h (elf_machine_fixup_plt): Likewise.
	* sysdeps/x86_64/dl-machine.h (elf_machine_fixup_plt): Likewise.
	* sysdeps/powerpc/powerpc64/dl-machine.c (_dl_error_localentry): New.
	(_dl_reloc_overflow): Increase buffser size.  Formatting.
	* sysdeps/powerpc/powerpc64/dl-machine.h (ppc64_local_entry_offset):
	Delete reloc param, add refsym and sym.  Check optimized plt
	call stubs for localentry:0 functions.  Adjust callers.
	(elf_machine_fixup_plt, elf_machine_plt_conflict): Add refsym
	and sym parameters.  Adjust callers.
	(_dl_reloc_overflow): Move attribute.
	(_dl_error_localentry): Declare.
	* elf/dl-runtime.c (_dl_fixup): Save original sym.  Pass
	refsym and sym to elf_machine_fixup_plt.
	* elf/testobj6.c (preload): Call printf.
2017-06-14 10:47:25 +09:30
..
bits Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
nptl Move shared pthread definitions to common headers 2017-05-09 17:49:17 -03:00
tilegx Optimize generic spinlock code and use C11 like atomic macros. 2017-06-06 09:41:56 +02:00
tilepro Optimize generic spinlock code and use C11 like atomic macros. 2017-06-06 09:41:56 +02:00
__longjmp.S Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
__tls_get_addr.S Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
_mcount.S Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
abort-instr.h
atomic-machine.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
backtrace.c
bsd-_setjmp.S
bsd-setjmp.S
bzero.S Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
configure tile: Enable PI_STATIC_AND_HIDDEN 2015-04-16 09:40:21 -04:00
configure.ac tile: Enable PI_STATIC_AND_HIDDEN 2015-04-16 09:40:21 -04:00
crti.S Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
crtn.S Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
dl-lookupcfg.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
dl-machine.h PowerPC64 ELFv2 PPC64_OPT_LOCALENTRY 2017-06-14 10:47:25 +09:30
dl-runtime.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
dl-start.S Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
dl-tls.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
dl-tls.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
dl-trampoline.S Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
ffs.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
ffsll.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
gccframe.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
Implies
jmpbuf-offsets.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
jmpbuf-unwind.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
ldsodefs.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
libm-test-ulps tile: regenerate libm-test-ulps 2015-10-22 12:00:31 -04:00
libm-test-ulps-name Do not hardcode platform names in manual/libm-err-tab.pl (bug 14139). 2016-11-04 16:49:06 +00:00
machine-gmon.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
Makefile
math_private.h Fix math_private.h multiple include guards. 2015-11-20 23:46:23 +00:00
math-tests.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
memcmp.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
memcopy.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
preconfigure Handle tilegx* machine names. 2016-11-04 13:32:06 +00:00
s_fma.c
s_fmaf.c
setjmp.S Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
sfp-machine.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
sotruss-lib.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
stackguard-macros.h
stackinfo.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
start.S Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
sysdep.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
tls-macros.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
tst-audit.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
Versions
wordcopy.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00