]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Declare ifunc resolver to return a pointer to the same type as the target
authorMartin Sebor <msebor@redhat.com>
Tue, 22 Aug 2017 15:35:23 +0000 (09:35 -0600)
committerFlorian Weimer <fweimer@redhat.com>
Tue, 19 Sep 2017 12:30:03 +0000 (14:30 +0200)
function to help GCC detect incompatibilities between the two when it's
enhanced to do so.

(cherry picked from commit ee4e992ebe5f9712faedeefe8958b67d61eaa0f2)

ChangeLog
include/libc-symbols.h

index b53d8830a202f6b568a81d20c7f99725e22e815e..ec9b9f5edbe8f6977a9d0f1fd71e88b7987556ee 100644 (file)
--- 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
index 3310e3a678741c57877e2022daf9e754951ea4d7..c50f9adec2475a46e2343e5bbe6649eaccb6503f 100644 (file)
@@ -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;                                  \