42 lines
1.5 KiB
Diff
42 lines
1.5 KiB
Diff
|
From ac6113cb0146494af7ecacbbdc6957ce501a40ec Mon Sep 17 00:00:00 2001
|
||
|
From: Martin Sebor <msebor@redhat.com>
|
||
|
Date: Tue, 22 Aug 2017 09:35:23 -0600
|
||
|
Subject: [PATCH 39] 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)
|
||
|
---
|
||
|
ChangeLog | 5 +++++
|
||
|
include/libc-symbols.h | 3 ++-
|
||
|
2 files changed, 7 insertions(+), 1 deletion(-)
|
||
|
|
||
|
diff --git a/ChangeLog b/ChangeLog
|
||
|
index b53d8830a2..ec9b9f5edb 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 3310e3a678..c50f9adec2 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; \
|
||
|
|