This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

fix _dl_hwcap access bug


Corrects access to _dl_hwcap.

2005-05-17  Alan Modra  <amodra@bigpond.net.au>

	* sysdeps/powerpc/powerpc32/fpu/__longjmp-common.S (__longjmp): Corrent
	_dl_hwcap access in PIC && !SHARED case.
	* sysdeps/powerpc/powerpc32/fpu/setjmp-common.S: Likewise.

diff -urp -xCVS libc2/sysdeps/powerpc/powerpc32/fpu/__longjmp-common.S libc3/sysdeps/powerpc/powerpc32/fpu/__longjmp-common.S
--- libc2/sysdeps/powerpc/powerpc32/fpu/__longjmp-common.S	2005-05-16 21:21:10.000000000 +0930
+++ libc3/sysdeps/powerpc/powerpc32/fpu/__longjmp-common.S	2005-05-17 10:25:55.000000000 +0930
@@ -41,7 +41,7 @@ ENTRY (BP_SYM (__longjmp))
 	mtlr    r6
 	lwz     r5,RTLD_GLOBAL_RO_DL_HWCAP_OFFSET(r5)
 #  else
-	lwz     r5,_rtld_global_ro@got(r5)
+	lwz     r5,_dl_hwcap@got(r5)
 	mtlr    r6
 	lwz     r5,0(r5)
 #  endif
diff -urp -xCVS libc2/sysdeps/powerpc/powerpc32/fpu/setjmp-common.S libc3/sysdeps/powerpc/powerpc32/fpu/setjmp-common.S
--- libc2/sysdeps/powerpc/powerpc32/fpu/setjmp-common.S	2005-05-16 21:21:10.000000000 +0930
+++ libc3/sysdeps/powerpc/powerpc32/fpu/setjmp-common.S	2005-05-17 10:25:55.000000000 +0930
@@ -74,20 +74,20 @@ ENTRY (BP_SYM (__sigsetjmp))
 	stw  r31,((JB_GPRS+17)*4)(3)
 	stfd fp31,((JB_FPRS+17*2)*4)(3)
 #ifndef __NO_VMX__
-#ifdef PIC
+# ifdef PIC
 	mflr    r6
 	bl      _GLOBAL_OFFSET_TABLE_@local-4
 	mflr    r5
-#ifdef SHARED
+#  ifdef SHARED
 	lwz     r5,_rtld_global_ro@got(r5)
 	mtlr    r6
 	lwz     r5,RTLD_GLOBAL_RO_DL_HWCAP_OFFSET(r5)
-#else
-	lwz     r5,_rtld_global_ro@got(r5)
+#  else
+	lwz     r5,_dl_hwcap@got(r5)
 	mtlr    r6
 	lwz     r5,0(r5)
-#endif
-#else
+#  endif
+# else
 	lis	r5,_dl_hwcap@ha
 	lwz     r5,_dl_hwcap@l(r5)
 #endif

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]