From: Martin Sebor Date: Tue, 22 Aug 2017 15:35:23 +0000 (-0600) Subject: Declare ifunc resolver to return a pointer to the same type as the target X-Git-Tag: upstream/2.30~2775 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ee4e992ebe5f9712faedeefe8958b67d61eaa0f2;p=platform%2Fupstream%2Fglibc.git 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. --- diff --git a/ChangeLog b/ChangeLog index 3954f2513a..573bd51ab5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2017-08-22 Martin Sebor + + * include/libc-symbols.h (__ifunc_resolver): Declare resolver + to return a pointer to the same type as the target function. + 2017-08-22 H.J. Lu [BZ #18822] diff --git a/include/libc-symbols.h b/include/libc-symbols.h index fe3571af52..42fc41a1a5 100644 --- a/include/libc-symbols.h +++ b/include/libc-symbols.h @@ -803,7 +803,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; \