glibc/sysdeps/arm
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
..
armv6 Remove sfi_* annotations from ARM assembly files. 2017-05-20 08:12:11 -04:00
armv6t2 Remove sfi_* annotations from ARM assembly files. 2017-05-20 08:12:11 -04:00
armv7 Remove sfi_* annotations from ARM assembly files. 2017-05-20 08:12:11 -04:00
bits Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
include/bits Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
nptl Optimize generic spinlock code and use C11 like atomic macros. 2017-06-06 09:41:56 +02:00
sys Fix more namespace issues in sys/ucontext.h (bug 21457). 2017-06-01 14:07:40 +00:00
__longjmp.S Remove sfi_* annotations from ARM assembly files. 2017-05-20 08:12:11 -04:00
abi-note.S Fix whitespace in ARM files to allow move. 2014-02-08 01:52:38 +00:00
add_n.S Remove sfi_* annotations from ARM assembly files. 2017-05-20 08:12:11 -04:00
addmul_1.S Remove sfi_* annotations from ARM assembly files. 2017-05-20 08:12:11 -04:00
aeabi_assert.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
aeabi_atexit.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
aeabi_errno_addr.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
aeabi_lcsts.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
aeabi_localeconv.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
aeabi_math.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
aeabi_mb_cur_max.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
aeabi_memclr.c Replace all internal uses of __bzero with memset. This removes the need 2017-06-12 14:56:53 +01:00
aeabi_memcpy.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
aeabi_memmove.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
aeabi_memset.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
aeabi_sighandlers.S Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
aeabi_unwind_cpp_pr1.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
arm-features.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
arm-mcount.S Remove sfi_* annotations from ARM assembly files. 2017-05-20 08:12:11 -04:00
arm-unwind-resume.S Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
atomic-machine.h Optimize generic spinlock code and use C11 like atomic macros. 2017-06-06 09:41:56 +02:00
backtrace.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
bsd-_setjmp.S Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
bsd-setjmp.S Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
configure Remove configure test for ARM TLS descriptors support. 2015-10-27 23:56:50 +00:00
configure.ac Remove configure test for ARM TLS descriptors support. 2015-10-27 23:56:50 +00: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-irel.h 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-sysdep.h 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-tlsdesc.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
dl-tlsdesc.S Remove sfi_* annotations from ARM assembly files. 2017-05-20 08:12:11 -04:00
dl-trampoline.S Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
e_sqrt.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
e_sqrtf.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
fclrexcpt.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
fedisblxcpt.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
feenablxcpt.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
fegetenv.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
fegetexcept.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
fegetmode.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
fegetround.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
feholdexcpt.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
fenv_private.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
fesetenv.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
fesetexcept.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
fesetmode.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
fesetround.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
feupdateenv.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
fgetexcptflg.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
find_exidx.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
fix-fp-int-convert-overflow.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
fpu_control.h Fix ARM fpu_control.h for assemblers requiring VFP insn names (bug 21047). 2017-01-19 00:05:34 +00:00
fraiseexcpt.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
frame.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
framestate.c Move arm from ports to libc. 2014-02-08 01:49:39 +00:00
fsetexcptflg.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
ftestexcept.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
gcc-compat.h 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
get-rounding-mode.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
gmp-mparam.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
Implies Remove sysdeps/arm/soft-fp directory. 2014-10-16 09:54:45 -07: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
libc-aeabi_read_tp.S ARM: Move more aeabi routine magic out of Linux-specific directories 2014-06-26 15:08:29 -07:00
libc-tls.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
libm-test-ulps Update arm, mips, powerpc-nofpu libm-test-ulps. 2017-02-17 23:10:01 +00: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
linkmap.h Rename bits/linkmap.h to linkmap.h (bug 14912). 2015-09-04 19:44:27 +00:00
machine-gmon.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
Makefile Remove configure test for ARM TLS descriptors support. 2015-10-27 23:56:50 +00:00
math_private.h math: add LDBL_CLASSIFY_COMPAT support 2015-12-03 13:00:46 -05:00
math-tests.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
memcpy.S Remove sfi_* annotations from ARM assembly files. 2017-05-20 08:12:11 -04:00
memmove.S Remove sfi_* annotations from ARM assembly files. 2017-05-20 08:12:11 -04:00
memset.S Remove sfi_* annotations from ARM assembly files. 2017-05-20 08:12:11 -04:00
memusage.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
nptl-aeabi_unwind_cpp_pr1.c ARM: Move more aeabi routine magic out of Linux-specific directories 2014-06-26 15:08:29 -07:00
preconfigure arm: drop EABI check 2014-11-22 19:34:49 -05:00
preconfigure.ac arm: drop EABI check 2014-11-22 19:34:49 -05:00
pt-arm-unwind-resume.S ARM: Consolidate with generic unwinder wrapper code 2015-01-05 15:42:16 -08:00
rt-aeabi_unwind_cpp_pr1.c ARM: Move more aeabi routine magic out of Linux-specific directories 2014-06-26 15:08:29 -07:00
rt-arm-unwind-resume.S ARM: Consolidate with generic unwinder wrapper code 2015-01-05 15:42:16 -08:00
rtld-global-offsets.sym Move arm from ports to libc. 2014-02-08 01:49:39 +00:00
s_fma.c Move arm from ports to libc. 2014-02-08 01:49:39 +00:00
s_fmaf.c Move arm from ports to libc. 2014-02-08 01:49:39 +00:00
setfpucw.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
setjmp.S Remove sfi_* annotations from ARM assembly files. 2017-05-20 08:12:11 -04:00
sfp-machine.h Remove sysdeps/arm/soft-fp directory. 2014-10-16 09:54:45 -07:00
sotruss-lib.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
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
static-stubs.c Move arm from ports to libc. 2014-02-08 01:49:39 +00:00
strlen.S Remove sfi_* annotations from ARM assembly files. 2017-05-20 08:12:11 -04:00
sub_n.S Move arm from ports to libc. 2014-02-08 01:49:39 +00:00
submul_1.S Remove sfi_* annotations from ARM assembly files. 2017-05-20 08:12:11 -04:00
sysdep.h Remove sfi_* annotations from ARM assembly files. 2017-05-20 08:12:11 -04:00
test-fpucw.c Move arm from ports to libc. 2014-02-08 01:49:39 +00:00
tls-macros.h ARM: Rewrite sysdeps/arm/tls-macros.h 2015-03-13 10:10:09 -07:00
tlsdesc.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
tlsdesc.sym Move arm from ports to libc. 2014-02-08 01:49:39 +00:00
tst-armtlsdescextlazy.c [BZ #17075] ARM: Fix immediate calculation of R_ARM_TLS_DESC 2014-06-20 20:22:42 +01:00
tst-armtlsdescextlazymod.c [BZ #17075] ARM: Fix immediate calculation of R_ARM_TLS_DESC 2014-06-20 20:22:42 +01:00
tst-armtlsdescextnow.c [BZ #17075] ARM: Fix immediate calculation of R_ARM_TLS_DESC 2014-06-20 20:22:42 +01:00
tst-armtlsdescextnowmod.c [BZ #17075] ARM: Fix immediate calculation of R_ARM_TLS_DESC 2014-06-20 20:22:42 +01:00
tst-armtlsdescloc.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
tst-armtlsdesclocmod.c 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
unwind-dw2-fde-glibc.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
unwind-pe.c Move arm from ports to libc. 2014-02-08 01:49:39 +00:00
unwind-resume.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
unwind.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
Versions Use -Werror=undef for assembly code. 2015-02-12 13:57:32 -08:00