arrfab / rpms / glibc

Forked from rpms/glibc 4 years ago
Clone

Blame SOURCES/glibc-rh1445644.patch

147e83
commit e0ed2fb40a0e29c43cf60addc74741dab15f2e05
147e83
Author: H.J. Lu <hjl.tools@gmail.com>
147e83
Date:   Fri Mar 6 04:55:56 2015 -0800
147e83
147e83
    Replace __attribute__((visibility("protected")))
147e83
    
147e83
    With copy relocation, address of protected data defined in the shared
147e83
    library may be external.  Compiler shouldn't asssume protected data will
147e83
    be local.  But due to
147e83
    
147e83
    https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65248
147e83
    
147e83
    __attribute__((visibility("protected"))) doesn't work correctly, we need
147e83
    to use asm (".protected xxx") instead.
147e83
    
147e83
            * elf/ifuncdep2.c (global): Replace
147e83
            __attribute__((visibility("protected"))) with
147e83
            asm (".protected global").
147e83
            * elf/ifuncmod1.c (global): Likewise.
147e83
            * elf/ifuncmod5.c (global): Likewise.
147e83
147e83
Index: b/elf/ifuncdep2.c
147e83
===================================================================
147e83
--- a/elf/ifuncdep2.c
147e83
+++ b/elf/ifuncdep2.c
147e83
@@ -2,7 +2,13 @@
147e83
 
147e83
 #include "ifunc-sel.h"
147e83
 
147e83
-int global __attribute__ ((visibility ("protected"))) = -1;
147e83
+int global = -1;
147e83
+/* Can't use __attribute__((visibility("protected"))) until the GCC bug:
147e83
+
147e83
+   https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65248
147e83
+
147e83
+   is fixed.  */
147e83
+asm (".protected global");
147e83
 
147e83
 static int
147e83
 one (void)
147e83
Index: b/elf/ifuncmod1.c
147e83
===================================================================
147e83
--- a/elf/ifuncmod1.c
147e83
+++ b/elf/ifuncmod1.c
147e83
@@ -6,7 +6,13 @@
147e83
  */
147e83
 #include "ifunc-sel.h"
147e83
 
147e83
-int global __attribute__ ((visibility ("protected"))) = -1;
147e83
+int global = -1;
147e83
+/* Can't use __attribute__((visibility("protected"))) until the GCC bug:
147e83
+
147e83
+   https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65248
147e83
+
147e83
+   is fixed.  */
147e83
+asm (".protected global");
147e83
 
147e83
 static int
147e83
 one (void)
147e83
Index: b/elf/ifuncmod5.c
147e83
===================================================================
147e83
--- a/elf/ifuncmod5.c
147e83
+++ b/elf/ifuncmod5.c
147e83
@@ -1,7 +1,13 @@
147e83
 /* Test STT_GNU_IFUNC symbols without direct function call.  */
147e83
 #include "ifunc-sel.h"
147e83
 
147e83
-int global __attribute__ ((visibility ("protected"))) = -1;
147e83
+int global = -1;
147e83
+/* Can't use __attribute__((visibility("protected"))) until the GCC bug:
147e83
+
147e83
+   https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65248
147e83
+
147e83
+   is fixed.  */
147e83
+asm (".protected global");
147e83
 
147e83
 static int
147e83
 one (void)