glibc/sysdeps/unix/sysv/linux/powerpc
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
..
bits powerpc: Add adaptive elision to rwlocks 2015-01-12 06:30:54 -05:00
powerpc32 powerpc __tls_get_addr call optimization 2015-03-25 15:53:47 +10:30
powerpc64 powerpc __tls_get_addr call optimization 2015-03-25 15:53:47 +10:30
sys Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
arch-fork.h Split arch-fork.h from fork.h 2014-05-16 11:17:41 -07:00
configure Move architecture cases out of sysdeps/unix/sysv/linux/configure.ac. 2014-06-24 20:53:03 +00:00
configure.ac Move architecture cases out of sysdeps/unix/sysv/linux/configure.ac. 2014-06-24 20:53:03 +00:00
dl-brk.S Update. 2002-04-06 01:45:15 +00:00
dl-cache.h Update. 2003-06-25 08:19:44 +00:00
dl-static.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
dl-sysdep.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
elision-conf.c powerpc: Fix Copyright dates and CL entry 2015-01-12 12:58:34 -05:00
elision-conf.h powerpc: Fix Copyright dates and CL entry 2015-01-12 12:58:34 -05:00
elision-lock.c powerpc: Fix Copyright dates and CL entry 2015-01-12 12:58:34 -05:00
elision-timed.c powerpc: Fix Copyright dates and CL entry 2015-01-12 12:58:34 -05:00
elision-trylock.c powerpc: Fix Copyright dates and CL entry 2015-01-12 12:58:34 -05:00
elision-unlock.c powerpc: Fix Copyright dates and CL entry 2015-01-12 12:58:34 -05:00
force-elision.h powerpc: Fix Copyright dates and CL entry 2015-01-12 12:58:34 -05:00
get_clockfreq.c BZ #16418: Fix powerpc get_clockfreq raciness 2015-01-21 10:46:49 -05:00
get_timebase_freq.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
getdents64.c
getmsg.c
getrlimit64.c
gettimeofday.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
htm.h powerpc: Fix TABORT encoding for little endian 2015-02-12 05:34:16 -06:00
Implies NPTL is no longer an add-on! 2014-07-07 09:29:06 -07:00
init-first.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
ioctl.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
ipc_priv.h Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
kernel_termios.h Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
kernel-features.h Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
ldconfig.h Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
ldd-rewrite.sed Update. 2002-09-05 10:28:51 +00:00
ldsodefs.h Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
libc-start.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
lowlevellock.h powerpc: Fix Copyright dates and CL entry 2015-01-12 12:58:34 -05:00
Makefile powerpc __tls_get_addr call optimization 2015-03-25 15:53:47 +10:30
nldbl-abi.h 2006-01-27 Dwayne Grant McConnell <decimal@us.ibm.com> 2006-01-28 00:15:15 +00:00
oldgetrlimit64.c
profil-counter.h
pt-longjmp.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
pthread_attr_setstack.c PowerPC: Move remaining nptl/sysdeps/unix/sysv/linux/powerpc/ files. 2014-05-26 11:45:14 -05:00
pthread_attr_setstacksize.c PowerPC: Move remaining nptl/sysdeps/unix/sysv/linux/powerpc/ files. 2014-05-26 11:45:14 -05:00
pthread_mutex_cond_lock.c powerpc: Fix Copyright dates and CL entry 2015-01-12 12:58:34 -05:00
pthread_mutex_lock.c powerpc: Fix Copyright dates and CL entry 2015-01-12 12:58:34 -05:00
pthread_mutex_timedlock.c powerpc: Fix Copyright dates and CL entry 2015-01-12 12:58:34 -05:00
pthread_mutex_trylock.c powerpc: Fix Copyright dates and CL entry 2015-01-12 12:58:34 -05:00
pthread_spin_unlock.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
putmsg.c
readdir64_r.c
readdir64.c
readelflib.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
rt-sysdep.c Update. 2004-04-19 06:19:34 +00:00
sched_getcpu.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
sigcontextinfo.h Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
syscall.S Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
syscalls.list Remove __libc_waitpid function name. 2014-11-07 01:27:16 +00:00
sysdep.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
test-gettimebasefreq.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
time.c Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
Versions PowerPC: use _dl_static_init to set GLRO(gl_pagesize) 2013-07-23 07:39:57 -05:00