aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Sebor <msebor@redhat.com>2017-08-22 09:35:23 -0600
committerMartin Sebor <msebor@redhat.com>2017-08-22 09:35:23 -0600
commitee4e992ebe5f9712faedeefe8958b67d61eaa0f2 (patch)
treee9cef671641d8bed7842522ba6f05e6efb46a335
parent20962acbea349b372311a727621c860006be3fab (diff)
downloadglibc-ee4e992ebe5f9712faedeefe8958b67d61eaa0f2.zip
glibc-ee4e992ebe5f9712faedeefe8958b67d61eaa0f2.tar.gz
glibc-ee4e992ebe5f9712faedeefe8958b67d61eaa0f2.tar.bz2
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.
-rw-r--r--ChangeLog5
-rw-r--r--include/libc-symbols.h3
2 files changed, 7 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 3954f25..573bd51 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-22 H.J. Lu <hongjiu.lu@intel.com>
[BZ #18822]
diff --git a/include/libc-symbols.h b/include/libc-symbols.h
index fe3571a..42fc41a 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; \