about summary refs log tree commit diff
path: root/sysdeps/s390/multiarch/ifunc-resolve.h
diff options
context:
space:
mode:
authorStefan Liebler <stli@linux.vnet.ibm.com>2017-04-21 15:30:00 +0200
committerStefan Liebler <stli@linux.vnet.ibm.com>2017-04-21 15:30:00 +0200
commit51213e2b8d89164527131f3bf6c5946b811c5e3e (patch)
tree3705fee058091223c817f73ad9d712c2a33170aa /sysdeps/s390/multiarch/ifunc-resolve.h
parent44e4b889ab0e0497567c8983ad25a78798a3ab51 (diff)
downloadglibc-51213e2b8d89164527131f3bf6c5946b811c5e3e.tar.gz
glibc-51213e2b8d89164527131f3bf6c5946b811c5e3e.tar.xz
glibc-51213e2b8d89164527131f3bf6c5946b811c5e3e.zip
S390: Use new s390_libc_ifunc_expr macro in s390 8bit-generic.c.
This patch adds s390_libc_ifunc_expr macro which uses the __ifunc base macro
in include/libc-symbols.h and lets the user define a generic expression to
choose the correct ifunc variant.  Furthermore as the base macro is used,
the ifunc resolver functions are now also using inhibit_stack_protector.
S390 needs its own version due to the hwcap argument of the ifunc resolver.

This new macro is now used in iconv code in 8bit-generic.c instead of using
gcc attribute ifunc directly.

ChangeLog:

	* sysdeps/s390/multiarch/ifunc-resolve.h
	(s390_libc_ifunc_expr_init, s390_libc_ifunc_expr): New Define.
	* sysdeps/s390/multiarch/8bit-generic.c
	(__to_generic, __from_generic): Use s390_libc_ifunc_expr to
	define ifunc resolvers.
Diffstat (limited to 'sysdeps/s390/multiarch/ifunc-resolve.h')
-rw-r--r--sysdeps/s390/multiarch/ifunc-resolve.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/sysdeps/s390/multiarch/ifunc-resolve.h b/sysdeps/s390/multiarch/ifunc-resolve.h
index c04822d55a..adbd08a6ee 100644
--- a/sysdeps/s390/multiarch/ifunc-resolve.h
+++ b/sysdeps/s390/multiarch/ifunc-resolve.h
@@ -83,3 +83,8 @@
 	   ? RESOLVERFUNC##_vx						\
 	   : RESOLVERFUNC##_c,						\
 	   unsigned long int dl_hwcap, s390_vx_libc_ifunc_init);
+
+#define s390_libc_ifunc_expr_init()
+#define s390_libc_ifunc_expr(TYPE_FUNC, FUNC, EXPR)		\
+  __ifunc (TYPE_FUNC, FUNC, EXPR, unsigned long int hwcap,	\
+	   s390_libc_ifunc_expr_init);