glibc/sysdeps/powerpc/powerpc32
Alan Modra afcd9480fe powerpc __tls_get_addr call optimization
This patch is glibc support for a PowerPC TLS optimization, inspired
by Alexandre Oliva's TLS optimization for other processors,
http://www.lsd.ic.unicamp.br/~oliva/writeups/TLS/RFC-TLSDESC-x86.txt

In essence, this optimization uses a zero module id in the tls_index
GOT entry to indicate that a TLS variable is allocated space in the
static TLS area.  A special plt call linker stub for __tls_get_addr
checks for such a tls_index and if found, returns the offset
immediately.  The linker communicates the fact that the special
__tls_get_addr stub is used by setting a bit in the dynamic tag
DT_PPC64_OPT/DT_PPC_OPT.  glibc communicates to the linker that this
optimization is available by the presence of __tls_get_addr_opt.

tst-tlsmod2.so is built with -Wl,--no-tls-get-addr-optimize for
tst-tls-dlinfo, which otherwise would fail since it tests that no
static tls is allocated.  The ld option --no-tls-get-addr-optimize has
been available since binutils-2.20 so doesn't need a configure test.

	* NEWS: Advertise TLS optimization.
	* elf/elf.h (R_PPC_TLSGD, R_PPC_TLSLD, DT_PPC_OPT, PPC_OPT_TLS): Define.
	(DT_PPC_NUM): Increment.
	* elf/dynamic-link.h (HAVE_STATIC_TLS): Define.
	(CHECK_STATIC_TLS): Use here.
	* sysdeps/powerpc/powerpc32/dl-machine.h (elf_machine_rela): Optimize
	TLS descriptors.
	* sysdeps/powerpc/powerpc64/dl-machine.h (elf_machine_rela): Likewise.
	* sysdeps/powerpc/dl-tls.c: New file.
	* sysdeps/powerpc/Versions: Add __tls_get_addr_opt.
	* sysdeps/powerpc/tst-tlsopt-powerpc.c: New tls test.
	* sysdeps/unix/sysv/linux/powerpc/Makefile: Add new test.
	Build tst-tlsmod2.so with --no-tls-get-addr-optimize.
	* sysdeps/unix/sysv/linux/powerpc/powerpc32/ld.abilist: Update.
	* sysdeps/unix/sysv/linux/powerpc/powerpc64/ld.abilist: Likewise.
	* sysdeps/unix/sysv/linux/powerpc/powerpc64/ld-le.abilist: Likewise.
2015-03-25 15:53:47 +10:30
..
405 Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
440 Move powerpc ports pieces to libc. 2013-10-04 16:02:33 +00:00
464 Move powerpc ports pieces to libc. 2013-10-04 16:02:33 +00:00
476 Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
970 powerpc: Re-work the Implies structure 2010-06-30 09:57:38 -07:00
a2 Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
bits Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
cell Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
e500/nofpu Fix libm feupdateenv namespace (bug 17748). 2015-01-07 19:01:20 +00:00
fpu Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
power4 powerpc: wordcopy/memmove cleanup for ppc32 2015-02-09 06:42:28 -05:00
power5 Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
power5+ Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
power6 Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
power6x Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
power7 Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
power8 PowerPC: Adjust multiarch Implies for PowerPC32 2013-12-06 05:47:05 -06:00
__longjmp-common.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
__longjmp.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
add_n.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
addmul_1.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
backtrace.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
bsd-_setjmp.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
bsd-setjmp.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
bzero.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
compat-ppc-mcount.S Fix missing _mcount@GLIBC_2.0 on powerpc32 2012-07-06 23:43:56 +02:00
configure powerpc: drop R_PPC_REL16 check 2015-02-10 06:09:22 -05:00
configure.ac powerpc: drop R_PPC_REL16 check 2015-02-10 06:09:22 -05:00
crti.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
crtn.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
dl-dtprocnum.h * sysdeps/powerpc/powerpc32/dl-machine.h (elf_machine_runtime_setup): 2005-06-17 23:11:35 +00:00
dl-irel.h Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
dl-machine.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
dl-machine.h powerpc __tls_get_addr call optimization 2015-03-25 15:53:47 +10:30
dl-start.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
dl-trampoline.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
gprrest0.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
gprrest1.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
gprsave0.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
gprsave1.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
Implies 2006-01-27 Dwayne Grant McConnell <decimal@us.ibm.com> 2006-01-28 00:15:15 +00:00
libgcc-compat.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
lshift.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
Makefile Move powerpc ports pieces to libc. 2013-10-04 16:02:33 +00:00
mcount.c PowerPC ugly symbol versioning 2013-10-04 10:38:28 +09:30
memset.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
mul_1.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
ppc-mcount.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
register-dump.h Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
rshift.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
rtld-memset.c powerpc: Use generic memset for RTLD for ppc32/64 2010-09-29 12:21:14 -04:00
setjmp-common.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
setjmp.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
stackguard-macros.h BZ #15754: CVE-2013-4788 2013-09-23 00:52:09 -04:00
start.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
stpcpy.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
strchr.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
strcmp.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
strcpy.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
strlen.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
strncmp.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
sub_n.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
submul_1.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
sysdep.h powerpc: abort transaction in syscalls 2015-01-12 06:32:08 -05:00
tls-macros.h Remove HAVE_ASM_PPC_REL16 references 2015-03-23 15:33:59 +10:30
tst-audit.h Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
Versions Move __mcount_internal from GLIBC_PRIVATE to GLIBC_2.16 2012-06-02 21:21:15 +02:00