about summary refs log tree commit diff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2008-04-11 21:04:10 +0000
committerUlrich Drepper <drepper@redhat.com>2008-04-11 21:04:10 +0000
commitcf3a8c7f42f7cb3dfd0304ab87ded3b739d9e811 (patch)
tree2d54fe6c3e473e936e36f5d0997161d93fde37a9
parent7763d4f148b328df102a0e0d0318cd9f8cf44a56 (diff)
downloadglibc-cf3a8c7f42f7cb3dfd0304ab87ded3b739d9e811.tar.gz
glibc-cf3a8c7f42f7cb3dfd0304ab87ded3b739d9e811.tar.xz
glibc-cf3a8c7f42f7cb3dfd0304ab87ded3b739d9e811.zip
* elf/tls-macros.h (__TLS_GET_ADDR): Define according to the ABI
	in use.
	(TLS_LD): Use __TLS_GET_ADDR instead of .__tls_get_addr.
	(TLS_GD): Likewise.
-rw-r--r--ChangeLog7
-rw-r--r--elf/tls-macros.h9
-rw-r--r--sysdeps/i386/i686/memcpy.S2
3 files changed, 15 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 97902b7e47..30a0d3e5ad 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2008-04-11  Ulrich Drepper  <drepper@redhat.com>
+
+	* elf/tls-macros.h (__TLS_GET_ADDR): Define according to the ABI
+	in use.
+	(TLS_LD): Use __TLS_GET_ADDR instead of .__tls_get_addr.
+	(TLS_GD): Likewise.
+
 2007-11-20  Ryan S. Arnold  <rsa@us.ibm.com>
 
 	[BZ #4997]
diff --git a/elf/tls-macros.h b/elf/tls-macros.h
index 37cbe7514f..6463a6c3f9 100644
--- a/elf/tls-macros.h
+++ b/elf/tls-macros.h
@@ -813,12 +813,17 @@ register void *__gp __asm__("$29");
         : "=b" (__result) );  \
       __result;  \
   })
+# ifdef HAVE_ASM_GLOBAL_DOT_NAME
+#  define __TLS_GET_ADDR ".__tls_get_addr"
+# else
+#  define __TLS_GET_ADDR "__tls_get_addr"
+# endif
 /* PowerPC64 Local Dynamic TLS access.  */
 #  define TLS_LD(x) \
   ({  int * __result;  \
       asm (  \
         "  addi  3,2," #x "@got@tlsld\n"  \
-        "  bl    .__tls_get_addr\n"  \
+        "  bl    " __TLS_GET_ADDR "\n"  \
         "  nop   \n"  \
         "  addis %0,3," #x "@dtprel@ha\n"  \
         "  addi  %0,%0," #x "@dtprel@l\n"  \
@@ -834,7 +839,7 @@ register void *__gp __asm__("$29");
   ({  int * __result;  \
       asm (  \
         "  addi  3,2," #x "@got@tlsgd\n"  \
-        "  bl    .__tls_get_addr\n"  \
+        "  bl    " __TLS_GET_ADDR "\n"  \
         "  nop   \n"  \
         "  mr    %0,3\n"  \
         : "=b" (__result) :  \
diff --git a/sysdeps/i386/i686/memcpy.S b/sysdeps/i386/i686/memcpy.S
index ff5c66e9d4..0b2da1ea27 100644
--- a/sysdeps/i386/i686/memcpy.S
+++ b/sysdeps/i386/i686/memcpy.S
@@ -71,10 +71,10 @@ ENTRY (BP_SYM (memcpy))
 1:	pushl	%eax
 	movl	%ecx, %eax
 	shrl	$2, %ecx
+	andl	$3, %eax
 	rep
 	movsl
 	movl	%eax, %ecx
-	andl	$3, %ecx
 	rep
 	movsb
 	popl	%eax