arrfab / rpms / glibc

Forked from rpms/glibc 5 years ago
Clone

Blame SOURCES/glibc-ppc64le-22.patch

147e83
# commit 9b874b2f1eb2550e39d3e9c38772e64a767e9de2
147e83
# Author: Alan Modra <amodra@gmail.com>
147e83
# Date:   Sat Aug 17 18:35:40 2013 +0930
147e83
# 
147e83
#     PowerPC ugly symbol versioning
147e83
#     http://sourceware.org/ml/libc-alpha/2013-08/msg00090.html
147e83
#     
147e83
#     This patch fixes symbol versioning in setjmp/longjmp.  The existing
147e83
#     code uses raw versions, which results in wrong symbol versioning when
147e83
#     you want to build glibc with a base version of 2.19 for LE.
147e83
#     
147e83
#     Note that the merging the 64-bit and 32-bit versions in novmx-lonjmp.c
147e83
#     and pt-longjmp.c doesn't result in GLIBC_2.0 versions for 64-bit, due
147e83
#     to the base in shlib_versions.
147e83
#     
147e83
#         * sysdeps/powerpc/longjmp.c: Use proper symbol versioning macros.
147e83
#         * sysdeps/powerpc/novmx-longjmp.c: Likewise.
147e83
#         * sysdeps/powerpc/powerpc32/bsd-_setjmp.S: Likewise.
147e83
#         * sysdeps/powerpc/powerpc32/bsd-setjmp.S: Likewise.
147e83
#         * sysdeps/powerpc/powerpc32/fpu/__longjmp.S: Likewise.
147e83
#         * sysdeps/powerpc/powerpc32/fpu/setjmp.S: Likewise.
147e83
#         * sysdeps/powerpc/powerpc32/mcount.c: Likewise.
147e83
#         * sysdeps/powerpc/powerpc32/setjmp.S: Likewise.
147e83
#         * sysdeps/powerpc/powerpc64/setjmp.S: Likewise.
147e83
#         * nptl/sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: Likewise.
147e83
# 
147e83
diff -urN glibc-2.17-c758a686/nptl/sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c glibc-2.17-c758a686/nptl/sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c
147e83
--- glibc-2.17-c758a686/nptl/sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c	2014-05-27 23:22:12.000000000 -0500
147e83
+++ glibc-2.17-c758a686/nptl/sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c	2014-05-27 23:23:44.000000000 -0500
147e83
@@ -41,13 +41,8 @@
147e83
   __novmx__libc_longjmp (env, val);
147e83
 }
147e83
 
147e83
-# if __WORDSIZE == 64
147e83
-symbol_version (__novmx_longjmp,longjmp,GLIBC_2.3);
147e83
-symbol_version (__novmx_siglongjmp,siglongjmp,GLIBC_2.3);
147e83
-# else
147e83
-symbol_version (__novmx_longjmp,longjmp,GLIBC_2.0);
147e83
-symbol_version (__novmx_siglongjmp,siglongjmp,GLIBC_2.0);
147e83
-# endif
147e83
+compat_symbol (libpthread, __novmx_longjmp, longjmp, GLIBC_2_0);
147e83
+compat_symbol (libpthread, __novmx_siglongjmp, siglongjmp, GLIBC_2_0);
147e83
 #endif /* defined SHARED && SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_3_4))  */ 
147e83
 
147e83
 void
147e83
@@ -62,5 +57,5 @@
147e83
   __libc_siglongjmp (env, val);
147e83
 }
147e83
 
147e83
-versioned_symbol (libc, __vmx_longjmp, longjmp, GLIBC_2_3_4);
147e83
-versioned_symbol (libc, __vmx_siglongjmp, siglongjmp, GLIBC_2_3_4);
147e83
+versioned_symbol (libpthread, __vmx_longjmp, longjmp, GLIBC_2_3_4);
147e83
+versioned_symbol (libpthread, __vmx_siglongjmp, siglongjmp, GLIBC_2_3_4);
147e83
diff -urN glibc-2.17-c758a686/sysdeps/powerpc/longjmp.c glibc-2.17-c758a686/sysdeps/powerpc/longjmp.c
147e83
--- glibc-2.17-c758a686/sysdeps/powerpc/longjmp.c	2014-05-27 23:22:10.000000000 -0500
147e83
+++ glibc-2.17-c758a686/sysdeps/powerpc/longjmp.c	2014-05-27 23:22:12.000000000 -0500
147e83
@@ -56,6 +56,6 @@
147e83
 
147e83
 default_symbol_version (__vmx__libc_longjmp, __libc_longjmp, GLIBC_PRIVATE);
147e83
 default_symbol_version (__vmx__libc_siglongjmp, __libc_siglongjmp, GLIBC_PRIVATE);
147e83
-default_symbol_version (__vmx_longjmp, _longjmp, GLIBC_2.3.4);
147e83
-default_symbol_version (__vmxlongjmp, longjmp, GLIBC_2.3.4);
147e83
-default_symbol_version (__vmxsiglongjmp, siglongjmp, GLIBC_2.3.4);
147e83
+versioned_symbol (libc, __vmx_longjmp, _longjmp, GLIBC_2_3_4);
147e83
+versioned_symbol (libc, __vmxlongjmp, longjmp, GLIBC_2_3_4);
147e83
+versioned_symbol (libc, __vmxsiglongjmp, siglongjmp, GLIBC_2_3_4);
147e83
diff -urN glibc-2.17-c758a686/sysdeps/powerpc/novmx-longjmp.c glibc-2.17-c758a686/sysdeps/powerpc/novmx-longjmp.c
147e83
--- glibc-2.17-c758a686/sysdeps/powerpc/novmx-longjmp.c	2014-05-27 23:22:10.000000000 -0500
147e83
+++ glibc-2.17-c758a686/sysdeps/powerpc/novmx-longjmp.c	2014-05-27 23:22:12.000000000 -0500
147e83
@@ -51,13 +51,7 @@
147e83
 weak_alias (__novmx__libc_siglongjmp, __novmxlongjmp)
147e83
 weak_alias (__novmx__libc_siglongjmp, __novmxsiglongjmp)
147e83
 
147e83
-# if __WORDSIZE == 64
147e83
-symbol_version (__novmx_longjmp,_longjmp,GLIBC_2.3);
147e83
-symbol_version (__novmxlongjmp,longjmp,GLIBC_2.3);
147e83
-symbol_version (__novmxsiglongjmp,siglongjmp,GLIBC_2.3);
147e83
-# else
147e83
-symbol_version (__novmx_longjmp,_longjmp,GLIBC_2.0);
147e83
-symbol_version (__novmxlongjmp,longjmp,GLIBC_2.0);
147e83
-symbol_version (__novmxsiglongjmp,siglongjmp,GLIBC_2.0);
147e83
-# endif
147e83
+compat_symbol (libc, __novmx_longjmp, _longjmp, GLIBC_2_0);
147e83
+compat_symbol (libc, __novmxlongjmp, longjmp, GLIBC_2_0);
147e83
+compat_symbol (libc, __novmxsiglongjmp, siglongjmp, GLIBC_2_0);
147e83
 #endif /* defined SHARED && SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_3_4))  */
147e83
diff -urN glibc-2.17-c758a686/sysdeps/powerpc/powerpc32/bsd-_setjmp.S glibc-2.17-c758a686/sysdeps/powerpc/powerpc32/bsd-_setjmp.S
147e83
--- glibc-2.17-c758a686/sysdeps/powerpc/powerpc32/bsd-_setjmp.S	2014-05-27 23:22:10.000000000 -0500
147e83
+++ glibc-2.17-c758a686/sysdeps/powerpc/powerpc32/bsd-_setjmp.S	2014-05-27 23:22:12.000000000 -0500
147e83
@@ -32,7 +32,7 @@
147e83
 /* Build a versioned object for libc.  */
147e83
 
147e83
 # if defined SHARED && SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_3_4)
147e83
-symbol_version (__novmx_setjmp,_setjmp,GLIBC_2.0);
147e83
+compat_symbol (libc, __novmx_setjmp, _setjmp, GLIBC_2_0);
147e83
 
147e83
 ENTRY (BP_SYM (__novmx_setjmp))
147e83
 	li r4,0			/* Set second argument to 0.  */
147e83
@@ -41,7 +41,7 @@
147e83
 libc_hidden_def (__novmx_setjmp)
147e83
 # endif /* defined SHARED  && SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_3_4) */
147e83
 
147e83
-default_symbol_version (__vmx_setjmp,_setjmp,GLIBC_2.3.4)
147e83
+versioned_symbol (libc, __vmx_setjmp, _setjmp, GLIBC_2_3_4)
147e83
 /* __GI__setjmp prototype is needed for ntpl i.e. _setjmp is defined
147e83
    as a libc_hidden_proto & is used in sysdeps/generic/libc-start.c
147e83
    if HAVE_CLEANUP_JMP_BUF is defined */
147e83
diff -urN glibc-2.17-c758a686/sysdeps/powerpc/powerpc32/bsd-setjmp.S glibc-2.17-c758a686/sysdeps/powerpc/powerpc32/bsd-setjmp.S
147e83
--- glibc-2.17-c758a686/sysdeps/powerpc/powerpc32/bsd-setjmp.S	2014-05-27 23:22:10.000000000 -0500
147e83
+++ glibc-2.17-c758a686/sysdeps/powerpc/powerpc32/bsd-setjmp.S	2014-05-27 23:22:12.000000000 -0500
147e83
@@ -27,7 +27,7 @@
147e83
 	b __novmx__sigsetjmp@local
147e83
 END (__novmxsetjmp)
147e83
 strong_alias (__novmxsetjmp, __novmx__setjmp)
147e83
-symbol_version (__novmxsetjmp, setjmp, GLIBC_2.0)
147e83
+compat_symbol (libc, __novmxsetjmp, setjmp, GLIBC_2_0)
147e83
 
147e83
 #endif  /* defined SHARED && SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_3_4) ) */
147e83
 
147e83
@@ -37,4 +37,4 @@
147e83
 END (__vmxsetjmp)
147e83
 strong_alias (__vmxsetjmp, __vmx__setjmp)
147e83
 strong_alias (__vmx__setjmp, __setjmp)
147e83
-default_symbol_version (__vmxsetjmp,setjmp,GLIBC_2.3.4)
147e83
+versioned_symbol (libc, __vmxsetjmp, setjmp, GLIBC_2_3_4)
147e83
diff -urN glibc-2.17-c758a686/sysdeps/powerpc/powerpc32/fpu/__longjmp.S glibc-2.17-c758a686/sysdeps/powerpc/powerpc32/fpu/__longjmp.S
147e83
--- glibc-2.17-c758a686/sysdeps/powerpc/powerpc32/fpu/__longjmp.S	2014-05-27 23:22:10.000000000 -0500
147e83
+++ glibc-2.17-c758a686/sysdeps/powerpc/powerpc32/fpu/__longjmp.S	2014-05-27 23:22:12.000000000 -0500
147e83
@@ -26,14 +26,14 @@
147e83
 
147e83
 #else /* !NOT_IN_libc */
147e83
 /* Build a versioned object for libc.  */
147e83
-default_symbol_version (__vmx__longjmp,__longjmp,GLIBC_2.3.4);
147e83
+versioned_symbol (libc, __vmx__longjmp, __longjmp, GLIBC_2_3_4);
147e83
 # define __longjmp  __vmx__longjmp
147e83
 # include "__longjmp-common.S"
147e83
 
147e83
 # if defined SHARED && SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_3_4)
147e83
 #  define __NO_VMX__
147e83
 #  undef JB_SIZE
147e83
-symbol_version (__novmx__longjmp,__longjmp,GLIBC_2.0);
147e83
+compat_symbol (libc, __novmx__longjmp, __longjmp, GLIBC_2_0);
147e83
 #  undef __longjmp
147e83
 #  define __longjmp  __novmx__longjmp
147e83
 #  include "__longjmp-common.S"
147e83
diff -urN glibc-2.17-c758a686/sysdeps/powerpc/powerpc32/fpu/setjmp.S glibc-2.17-c758a686/sysdeps/powerpc/powerpc32/fpu/setjmp.S
147e83
--- glibc-2.17-c758a686/sysdeps/powerpc/powerpc32/fpu/setjmp.S	2014-05-27 23:22:10.000000000 -0500
147e83
+++ glibc-2.17-c758a686/sysdeps/powerpc/powerpc32/fpu/setjmp.S	2014-05-27 23:22:12.000000000 -0500
147e83
@@ -26,7 +26,7 @@
147e83
 
147e83
 #else /* !NOT_IN_libc */
147e83
 /* Build a versioned object for libc.  */
147e83
-default_symbol_version (__vmx__sigsetjmp,__sigsetjmp,GLIBC_2.3.4)
147e83
+versioned_symbol (libc, __vmx__sigsetjmp, __sigsetjmp, GLIBC_2_3_4)
147e83
 # define __sigsetjmp __vmx__sigsetjmp
147e83
 # define __sigjmp_save __vmx__sigjmp_save
147e83
 # include "setjmp-common.S"
147e83
@@ -36,7 +36,7 @@
147e83
 #  undef __sigsetjmp
147e83
 #  undef __sigjmp_save
147e83
 #  undef JB_SIZE
147e83
-symbol_version (__novmx__sigsetjmp,__sigsetjmp,GLIBC_2.0)
147e83
+compat_symbol (libc, __novmx__sigsetjmp, __sigsetjmp, GLIBC_2_0)
147e83
 #  define __sigsetjmp __novmx__sigsetjmp
147e83
 #  define __sigjmp_save __novmx__sigjmp_save
147e83
 #  include "setjmp-common.S"
147e83
diff -urN glibc-2.17-c758a686/sysdeps/powerpc/powerpc32/mcount.c glibc-2.17-c758a686/sysdeps/powerpc/powerpc32/mcount.c
147e83
--- glibc-2.17-c758a686/sysdeps/powerpc/powerpc32/mcount.c	2014-05-27 23:22:10.000000000 -0500
147e83
+++ glibc-2.17-c758a686/sysdeps/powerpc/powerpc32/mcount.c	2014-05-27 23:22:12.000000000 -0500
147e83
@@ -9,7 +9,7 @@
147e83
 /* __mcount_internal was added in glibc 2.15 with version GLIBC_PRIVATE,
147e83
    but it should have been put in version GLIBC_2.15.  Mark the
147e83
    GLIBC_PRIVATE version obsolete and add it to GLIBC_2.16 instead.  */
147e83
-default_symbol_version (___mcount_internal, __mcount_internal, GLIBC_2.16);
147e83
+versioned_symbol (libc, ___mcount_internal, __mcount_internal, GLIBC_2_16);
147e83
 
147e83
 #if SHLIB_COMPAT (libc, GLIBC_2_15, GLIBC_2_16)
147e83
 strong_alias (___mcount_internal, ___mcount_internal_private);
147e83
diff -urN glibc-2.17-c758a686/sysdeps/powerpc/powerpc32/setjmp.S glibc-2.17-c758a686/sysdeps/powerpc/powerpc32/setjmp.S
147e83
--- glibc-2.17-c758a686/sysdeps/powerpc/powerpc32/setjmp.S	2014-05-27 23:22:10.000000000 -0500
147e83
+++ glibc-2.17-c758a686/sysdeps/powerpc/powerpc32/setjmp.S	2014-05-27 23:22:12.000000000 -0500
147e83
@@ -25,7 +25,7 @@
147e83
 
147e83
 #else /* !NOT_IN_libc */
147e83
 /* Build a versioned object for libc.  */
147e83
-default_symbol_version (__vmx__sigsetjmp,__sigsetjmp,GLIBC_2.3.4)
147e83
+versioned_symbol (libc, __vmx__sigsetjmp, __sigsetjmp, GLIBC_2_3_4)
147e83
 # define __sigsetjmp __vmx__sigsetjmp
147e83
 # define __sigjmp_save __vmx__sigjmp_save
147e83
 # include "setjmp-common.S"
147e83
@@ -35,7 +35,7 @@
147e83
 #  undef __sigsetjmp
147e83
 #  undef __sigjmp_save
147e83
 #  undef JB_SIZE
147e83
-symbol_version (__novmx__sigsetjmp,__sigsetjmp,GLIBC_2.0)
147e83
+compat_symbol (libc, __novmx__sigsetjmp, __sigsetjmp, GLIBC_2_0)
147e83
 #  define __sigsetjmp __novmx__sigsetjmp
147e83
 #  define __sigjmp_save __novmx__sigjmp_save
147e83
 #  include "setjmp-common.S"
147e83
diff -urN glibc-2.17-c758a686/sysdeps/powerpc/powerpc64/setjmp.S glibc-2.17-c758a686/sysdeps/powerpc/powerpc64/setjmp.S
147e83
--- glibc-2.17-c758a686/sysdeps/powerpc/powerpc64/setjmp.S	2014-05-27 23:22:10.000000000 -0500
147e83
+++ glibc-2.17-c758a686/sysdeps/powerpc/powerpc64/setjmp.S	2014-05-27 23:22:12.000000000 -0500
147e83
@@ -26,9 +26,9 @@
147e83
 
147e83
 #else /* !NOT_IN_libc */
147e83
 /* Build a versioned object for libc.  */
147e83
-default_symbol_version (__vmxsetjmp, setjmp, GLIBC_2.3.4)
147e83
-default_symbol_version (__vmx_setjmp,_setjmp,GLIBC_2.3.4)
147e83
-default_symbol_version (__vmx__sigsetjmp,__sigsetjmp,GLIBC_2.3.4)
147e83
+versioned_symbol (libc, __vmxsetjmp, setjmp, GLIBC_2_3_4)
147e83
+versioned_symbol (libc, __vmx_setjmp, _setjmp, GLIBC_2_3_4)
147e83
+versioned_symbol (libc, __vmx__sigsetjmp, __sigsetjmp, GLIBC_2_3_4)
147e83
 # define setjmp __vmxsetjmp
147e83
 # define _setjmp __vmx_setjmp
147e83
 # define __sigsetjmp __vmx__sigsetjmp
147e83
@@ -44,9 +44,9 @@
147e83
 #  undef __sigjmp_save
147e83
 #  undef JB_SIZE
147e83
 #  define __NO_VMX__
147e83
-symbol_version (__novmxsetjmp, setjmp, GLIBC_2.3)
147e83
-symbol_version (__novmx_setjmp,_setjmp,GLIBC_2.3);
147e83
-symbol_version (__novmx__sigsetjmp,__sigsetjmp,GLIBC_2.3)
147e83
+compat_symbol (libc, __novmxsetjmp, setjmp, GLIBC_2_3)
147e83
+compat_symbol (libc, __novmx_setjmp,_setjmp, GLIBC_2_3);
147e83
+compat_symbol (libc, __novmx__sigsetjmp,__sigsetjmp, GLIBC_2_3)
147e83
 #  define setjmp __novmxsetjmp
147e83
 #  define _setjmp __novmx_setjmp
147e83
 #  define __sigsetjmp __novmx__sigsetjmp