This is the mail archive of the glibc-cvs@sourceware.org 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]

GNU C Library master sources branch release/2.26/master updated. glibc-2.26-40-g37d4262


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, release/2.26/master has been updated
       via  37d4262a7a35886cf8ac856457bbad8c0498c8d6 (commit)
       via  ac6113cb0146494af7ecacbbdc6957ce501a40ec (commit)
      from  2422c6032fd5e95b1c29df5b8671455ead51314e (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=37d4262a7a35886cf8ac856457bbad8c0498c8d6

commit 37d4262a7a35886cf8ac856457bbad8c0498c8d6
Author: Gabriel F. T. Gomes <gftg@linux.vnet.ibm.com>
Date:   Tue Aug 22 14:01:07 2017 -0300

    Fix remaining return type of ifunc resolver declaration
    
    Since Martin Sebor's commit
    
    commit ee4e992ebe5f9712faedeefe8958b67d61eaa0f2
    Author: Martin Sebor <msebor@redhat.com>
    Date:   Tue Aug 22 09:35:23 2017 -0600
    
        Declare ifunc resolver to return a pointer to the same type as the target
        function to help GCC detect incompatibilities between the two when it's
        enhanced to do so.
    
    builds for powerpc64le fail in the declaration of some ifunc resolvers,
    because the ifunc is declared with unmatching return types.  One of the
    declarations comes from the __ifunc_resolver macro, which was patched by
    the aforementioned commit:
    
        /* Helper / base  macros for indirect function symbols.  */
        #define __ifunc_resolver(type_name, name, expr, arg, init, classifier) \
          classifier inhibit_stack_protector                                   \
          __typeof (type_name) *name##_ifunc (arg)                             \
    
    whereas the other comes from the unpatched __ifunc macro when
    HAVE_GCC_IFUNC is not defined:
    
        # define __ifunc(type_name, name, expr, arg, init)                     \
          extern __typeof (type_name) name;                                    \
          void *name##_ifunc (arg) __asm__ (#name);                            \
    
    This patch changes the return type of the ifunc resolver in the __ifunc
    macro, so that it matches the return type of the target function,
    similarly to what the aforementioned commit does.
    
    Tested for powerpc64le and s390x with unpatched GCC.
    
    	* include/libc-symbols.h: [!defined HAVE_GCC_IFUNC] (__ifunc):
    	Change the return type of the ifunc resolver to match the return
    	type of the target function.
    
    (cherry picked from commit b513da7e80febbbfb8e58282075018652b6f7273)

diff --git a/ChangeLog b/ChangeLog
index ec9b9f5..6b09c61 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2017-08-22  Gabriel F. T. Gomes  <gftg@linux.vnet.ibm.com>
+
+	* include/libc-symbols.h: [!defined HAVE_GCC_IFUNC] (__ifunc):
+	Change the return type of the ifunc resolver to match the return
+	type of the target function.
+
 2017-08-22  Martin Sebor  <msebor@redhat.com>
 
 	* include/libc-symbols.h (__ifunc_resolver): Declare resolver
diff --git a/include/libc-symbols.h b/include/libc-symbols.h
index c50f9ad..5bf5770 100644
--- a/include/libc-symbols.h
+++ b/include/libc-symbols.h
@@ -810,7 +810,7 @@ for linking")
 
 # define __ifunc(type_name, name, expr, arg, init)			\
   extern __typeof (type_name) name;					\
-  void *name##_ifunc (arg) __asm__ (#name);				\
+  __typeof (type_name) *name##_ifunc (arg) __asm__ (#name);		\
   __ifunc_resolver (type_name, name, expr, arg, init,)			\
  __asm__ (".type " #name ", %gnu_indirect_function");
 

http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ac6113cb0146494af7ecacbbdc6957ce501a40ec

commit ac6113cb0146494af7ecacbbdc6957ce501a40ec
Author: Martin Sebor <msebor@redhat.com>
Date:   Tue Aug 22 09:35:23 2017 -0600

    Declare ifunc resolver to return a pointer to the same type as the target
    function to help GCC detect incompatibilities between the two when it's
    enhanced to do so.
    
    (cherry picked from commit ee4e992ebe5f9712faedeefe8958b67d61eaa0f2)

diff --git a/ChangeLog b/ChangeLog
index b53d883..ec9b9f5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2017-08-22  Martin Sebor  <msebor@redhat.com>
+
+	* include/libc-symbols.h (__ifunc_resolver): Declare resolver
+	to return a pointer to the same type as the target function.
+
 2017-08-03  Alan Modra  <amodra@gmail.com>
 
 	* sysdeps/powerpc/mod-tlsopt-powerpc.c: Extract from
diff --git a/include/libc-symbols.h b/include/libc-symbols.h
index 3310e3a..c50f9ad 100644
--- a/include/libc-symbols.h
+++ b/include/libc-symbols.h
@@ -782,7 +782,8 @@ for linking")
 
 /* Helper / base  macros for indirect function symbols.  */
 #define __ifunc_resolver(type_name, name, expr, arg, init, classifier)	\
-  classifier inhibit_stack_protector void *name##_ifunc (arg)					\
+  classifier inhibit_stack_protector					\
+  __typeof (type_name) *name##_ifunc (arg)				\
   {									\
     init ();								\
     __typeof (type_name) *res = expr;					\

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog              |   11 +++++++++++
 include/libc-symbols.h |    5 +++--
 2 files changed, 14 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
GNU C Library master sources


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