about summary refs log tree commit diff
path: root/sysdeps/i386
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2007-08-24 02:03:29 +0000
committerUlrich Drepper <drepper@redhat.com>2007-08-24 02:03:29 +0000
commit62e1b1f5644f5a0d913b91e7cc1bca4c6c32cf43 (patch)
treec3c8fbfdacad68f0822ca75f0f9ad7916fe5262e /sysdeps/i386
parent0008163a30fec920ede228aea2f6e06e75e76514 (diff)
downloadglibc-62e1b1f5644f5a0d913b91e7cc1bca4c6c32cf43.tar.gz
glibc-62e1b1f5644f5a0d913b91e7cc1bca4c6c32cf43.tar.xz
glibc-62e1b1f5644f5a0d913b91e7cc1bca4c6c32cf43.zip
* sysdeps/i386/dl-trampoline.S (_dl_runtime_resolve): Avoid
	implicit atomic operation when storing function pointer.
	(_dl_runtime_profile): Likewise.
Diffstat (limited to 'sysdeps/i386')
-rw-r--r--sysdeps/i386/dl-trampoline.S16
1 files changed, 8 insertions, 8 deletions
diff --git a/sysdeps/i386/dl-trampoline.S b/sysdeps/i386/dl-trampoline.S
index f991797ee9..5856a2f8a0 100644
--- a/sysdeps/i386/dl-trampoline.S
+++ b/sysdeps/i386/dl-trampoline.S
@@ -37,10 +37,10 @@ _dl_runtime_resolve:
 	call _dl_fixup		# Call resolver.
 	popl %edx		# Get register content back.
 	cfi_adjust_cfa_offset (-4)
-	popl %ecx
-	cfi_adjust_cfa_offset (-4)
-	xchgl %eax, (%esp)	# Get %eax contents end store function address.
-	ret $8			# Jump to function address.
+	movl (%esp), %ecx
+	movl %eax, (%esp)	# Store the function address.
+	movl 4(%esp), %eax
+	ret $12			# Jump to function address.
 	cfi_endproc
 	.size _dl_runtime_resolve, .-_dl_runtime_resolve
 
@@ -83,10 +83,10 @@ _dl_runtime_profile:
 	cfi_adjust_cfa_offset (-4)
 	popl %edx		# Get register content back.
 	cfi_adjust_cfa_offset (-4)
-	popl %ecx
-	cfi_adjust_cfa_offset (-4)
-	xchgl %eax, (%esp)	# Get %eax contents end store function address.
-	ret $16			# Jump to function address.
+	movl (%esp), %ecx
+	movl %eax, (%esp)	# Store the function address.
+	movl 4(%esp), %eax
+	ret $20			# Jump to function address.
 
 	/*
 	    +32     return address