about summary refs log tree commit diff
path: root/ports/sysdeps
diff options
context:
space:
mode:
authorChris Metcalf <cmetcalf@tilera.com>2012-09-06 11:25:04 -0400
committerChris Metcalf <cmetcalf@tilera.com>2012-09-06 11:25:04 -0400
commit053406fa70d071423c43465d60042d84c24f94cf (patch)
treee10dd8e47860d5dd8916fe99bce5a914604e2275 /ports/sysdeps
parent14c996c83b265c31aae5f64480d393fa5d3364f3 (diff)
downloadglibc-053406fa70d071423c43465d60042d84c24f94cf.tar.gz
glibc-053406fa70d071423c43465d60042d84c24f94cf.tar.xz
glibc-053406fa70d071423c43465d60042d84c24f94cf.zip
tile: BZ#14237: fix __tls_get_addr bug initializing new modules
We were missing a check for TLS_DTV_UNALLOCATED; if set, we need
to go to the slow path.
Diffstat (limited to 'ports/sysdeps')
-rw-r--r--ports/sysdeps/tile/__tls_get_addr.S2
1 files changed, 2 insertions, 0 deletions
diff --git a/ports/sysdeps/tile/__tls_get_addr.S b/ports/sysdeps/tile/__tls_get_addr.S
index 74e4fa2c26..6de79ba53d 100644
--- a/ports/sysdeps/tile/__tls_get_addr.S
+++ b/ports/sysdeps/tile/__tls_get_addr.S
@@ -76,6 +76,8 @@ ENTRY (__tls_get_addr)
 	 ADD_PTR r28, r28, r27	/* pointer into module array */
 	}
 	LD_PTR r26, r28		/* r26 = module TLS pointer */
+	CMPEQI r25, r26, -1     /* check r26 == TLS_DTV_UNALLOCATED */
+	BNEZ r25, .Lslowpath
 	{
 	 ADD_PTR r0, r26, r29
 	 jrp lr