From: Chris Metcalf Date: Thu, 6 Sep 2012 15:25:04 +0000 (-0400) Subject: tile: BZ#14237: fix __tls_get_addr bug initializing new modules X-Git-Tag: glibc-2.17~582 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=053406fa70d071423c43465d60042d84c24f94cf;p=thirdparty%2Fglibc.git 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. --- diff --git a/ports/ChangeLog.tile b/ports/ChangeLog.tile index 0be61921eba..c3a027d6ab4 100644 --- a/ports/ChangeLog.tile +++ b/ports/ChangeLog.tile @@ -1,3 +1,7 @@ +2012-09-06 Chris Metcalf + + * sysdeps/tile/__tls_get_addr.S: Fix TLS module initialization bug. + 2012-08-27 Joseph Myers * sysdeps/unix/sysv/linux/tile/kernel-features.h diff --git a/ports/sysdeps/tile/__tls_get_addr.S b/ports/sysdeps/tile/__tls_get_addr.S index 74e4fa2c263..6de79ba53db 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