about summary refs log tree commit diff
path: root/sysdeps
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps')
-rw-r--r--sysdeps/aarch64/strchrnul.S1
-rw-r--r--sysdeps/generic/math_private.h33
-rw-r--r--sysdeps/generic/math_private_calls.h105
-rw-r--r--sysdeps/gnu/glob-lstat-compat.c4
-rw-r--r--sysdeps/i386/fpu/s_rintl.c5
-rw-r--r--sysdeps/i386/i686/multiarch/memrchr.c9
-rw-r--r--sysdeps/i386/i686/multiarch/strncase.c2
-rw-r--r--sysdeps/i386/i686/multiarch/wcslen.c10
-rw-r--r--sysdeps/i386/strchrnul.S2
-rw-r--r--sysdeps/ieee754/dbl-64/mpa.h41
-rw-r--r--sysdeps/ieee754/dbl-64/s_erf.c2
-rw-r--r--sysdeps/ieee754/dbl-64/s_expm1.c1
-rw-r--r--sysdeps/ieee754/dbl-64/s_nextup.c2
-rw-r--r--sysdeps/ieee754/dbl-64/s_sincos.c1
-rw-r--r--sysdeps/ieee754/dbl-64/wordsize-64/s_frexp.c1
-rw-r--r--sysdeps/ieee754/dbl-64/wordsize-64/s_nearbyint.c1
-rw-r--r--sysdeps/ieee754/dbl-64/wordsize-64/s_round.c1
-rw-r--r--sysdeps/ieee754/flt-32/s_atanf.c1
-rw-r--r--sysdeps/ieee754/flt-32/s_ceilf.c1
-rw-r--r--sysdeps/ieee754/flt-32/s_erff.c2
-rw-r--r--sysdeps/ieee754/flt-32/s_expm1f.c1
-rw-r--r--sysdeps/ieee754/flt-32/s_floorf.c1
-rw-r--r--sysdeps/ieee754/flt-32/s_frexpf.c1
-rw-r--r--sysdeps/ieee754/flt-32/s_nearbyintf.c1
-rw-r--r--sysdeps/ieee754/flt-32/s_nextupf.c2
-rw-r--r--sysdeps/ieee754/flt-32/s_rintf.c1
-rw-r--r--sysdeps/ieee754/flt-32/s_roundevenf.c1
-rw-r--r--sysdeps/ieee754/flt-32/s_roundf.c1
-rw-r--r--sysdeps/ieee754/flt-32/s_truncf.c1
-rw-r--r--sysdeps/ieee754/ldbl-128/s_atanl.c2
-rw-r--r--sysdeps/ieee754/ldbl-128/s_ceill.c1
-rw-r--r--sysdeps/ieee754/ldbl-128/s_cosl.c1
-rw-r--r--sysdeps/ieee754/ldbl-128/s_erfl.c5
-rw-r--r--sysdeps/ieee754/ldbl-128/s_floorl.c1
-rw-r--r--sysdeps/ieee754/ldbl-128/s_frexpl.c1
-rw-r--r--sysdeps/ieee754/ldbl-128/s_nearbyintl.c1
-rw-r--r--sysdeps/ieee754/ldbl-128/s_nextupl.c2
-rw-r--r--sysdeps/ieee754/ldbl-128/s_rintl.c1
-rw-r--r--sysdeps/ieee754/ldbl-128/s_roundevenl.c1
-rw-r--r--sysdeps/ieee754/ldbl-128/s_roundl.c1
-rw-r--r--sysdeps/ieee754/ldbl-128/s_sincosl.c1
-rw-r--r--sysdeps/ieee754/ldbl-128/s_sinl.c1
-rw-r--r--sysdeps/ieee754/ldbl-128/s_truncl.c1
-rw-r--r--sysdeps/ieee754/ldbl-96/s_cosl.c1
-rw-r--r--sysdeps/ieee754/ldbl-96/s_erfl.c5
-rw-r--r--sysdeps/ieee754/ldbl-96/s_frexpl.c1
-rw-r--r--sysdeps/ieee754/ldbl-96/s_nextupl.c2
-rw-r--r--sysdeps/ieee754/ldbl-96/s_roundevenl.c1
-rw-r--r--sysdeps/ieee754/ldbl-96/s_roundl.c1
-rw-r--r--sysdeps/ieee754/ldbl-96/s_signbitl.c3
-rw-r--r--sysdeps/ieee754/ldbl-96/s_sincosl.c1
-rw-r--r--sysdeps/ieee754/ldbl-96/s_sinl.c1
-rw-r--r--sysdeps/m68k/strchrnul.S2
-rw-r--r--sysdeps/mach/hurd/dirfd.c1
-rw-r--r--sysdeps/posix/dirfd.c2
-rw-r--r--sysdeps/powerpc/powerpc32/power4/multiarch/memrchr.c2
-rw-r--r--sysdeps/powerpc/powerpc32/power4/multiarch/strchrnul.c2
-rw-r--r--sysdeps/powerpc/powerpc32/power7/memrchr.S1
-rw-r--r--sysdeps/powerpc/powerpc64/multiarch/memrchr.c2
-rw-r--r--sysdeps/powerpc/powerpc64/multiarch/strchrnul.c2
-rw-r--r--sysdeps/powerpc/powerpc64/power7/memrchr.S1
-rw-r--r--sysdeps/powerpc/powerpc64/power8/memrchr.S1
-rw-r--r--sysdeps/powerpc/powerpc64/power8/strchr.S6
-rw-r--r--sysdeps/s390/multiarch/memrchr.c1
-rw-r--r--sysdeps/s390/multiarch/strchrnul.c1
-rw-r--r--sysdeps/s390/multiarch/wcslen.c1
-rw-r--r--sysdeps/s390/multiarch/wcsnlen.c1
-rw-r--r--sysdeps/tile/strchrnul.c1
-rw-r--r--sysdeps/unix/sysv/linux/arm/umount.c2
-rw-r--r--sysdeps/unix/sysv/linux/generic/umount.c2
-rw-r--r--sysdeps/unix/sysv/linux/glob-lstat-compat.c21
-rw-r--r--sysdeps/unix/sysv/linux/glob64-lstat-compat.c10
-rw-r--r--sysdeps/unix/sysv/linux/ia64/syscalls.list2
-rw-r--r--sysdeps/unix/sysv/linux/mips/mips64/umount.c2
-rw-r--r--sysdeps/unix/sysv/linux/umount2.S1
-rw-r--r--sysdeps/unix/sysv/linux/x86_64/compat-timer.h10
-rw-r--r--sysdeps/unix/sysv/linux/x86_64/timer_create.c1
-rw-r--r--sysdeps/unix/sysv/linux/x86_64/timer_delete.c1
-rw-r--r--sysdeps/unix/sysv/linux/x86_64/timer_getoverr.c1
-rw-r--r--sysdeps/unix/sysv/linux/x86_64/timer_gettime.c1
-rw-r--r--sysdeps/unix/sysv/linux/x86_64/timer_settime.c1
-rw-r--r--sysdeps/unix/sysv/linux/x86_64/umount.c4
-rw-r--r--sysdeps/unix/sysv/mount-internal.h26
-rw-r--r--sysdeps/x86/fpu/include/bits/fenv.h16
-rw-r--r--sysdeps/x86_64/fpu/multiarch/e_log-avx.c2
-rw-r--r--sysdeps/x86_64/fpu/multiarch/e_log-fma.c2
-rw-r--r--sysdeps/x86_64/fpu/multiarch/e_log-fma4.c2
-rw-r--r--sysdeps/x86_64/fpu/multiarch/e_logf-fma.c2
-rw-r--r--sysdeps/x86_64/fpu/multiarch/e_powf.c6
-rw-r--r--sysdeps/x86_64/fpu/multiarch/s_atan-avx.c2
-rw-r--r--sysdeps/x86_64/fpu/multiarch/s_atan-fma.c2
-rw-r--r--sysdeps/x86_64/fpu/multiarch/s_atan-fma4.c2
-rw-r--r--sysdeps/x86_64/fpu/multiarch/s_atan.c2
-rw-r--r--sysdeps/x86_64/fpu/multiarch/s_ceil-c.c1
-rw-r--r--sysdeps/x86_64/fpu/multiarch/s_ceil.c8
-rw-r--r--sysdeps/x86_64/fpu/multiarch/s_ceilf.c8
-rw-r--r--sysdeps/x86_64/fpu/multiarch/s_cosf.c5
-rw-r--r--sysdeps/x86_64/fpu/multiarch/s_floor-c.c1
-rw-r--r--sysdeps/x86_64/fpu/multiarch/s_floor.c8
-rw-r--r--sysdeps/x86_64/fpu/multiarch/s_floorf.c8
-rw-r--r--sysdeps/x86_64/fpu/multiarch/s_nearbyint-c.c5
-rw-r--r--sysdeps/x86_64/fpu/multiarch/s_nearbyint.c8
-rw-r--r--sysdeps/x86_64/fpu/multiarch/s_nearbyintf.c8
-rw-r--r--sysdeps/x86_64/fpu/multiarch/s_rint-c.c1
-rw-r--r--sysdeps/x86_64/fpu/multiarch/s_rint.c8
-rw-r--r--sysdeps/x86_64/fpu/multiarch/s_rintf.c8
-rw-r--r--sysdeps/x86_64/fpu/multiarch/s_sin-avx.c2
-rw-r--r--sysdeps/x86_64/fpu/multiarch/s_sin-fma.c2
-rw-r--r--sysdeps/x86_64/fpu/multiarch/s_sin-fma4.c2
-rw-r--r--sysdeps/x86_64/fpu/multiarch/s_sin.c3
-rw-r--r--sysdeps/x86_64/fpu/multiarch/s_sincosf.c5
-rw-r--r--sysdeps/x86_64/fpu/multiarch/s_sinf.c5
-rw-r--r--sysdeps/x86_64/fpu/multiarch/s_trunc-c.c1
-rw-r--r--sysdeps/x86_64/fpu/multiarch/s_trunc.c8
-rw-r--r--sysdeps/x86_64/fpu/multiarch/s_truncf.c8
-rw-r--r--sysdeps/x86_64/fpu/s_ceill.S1
-rw-r--r--sysdeps/x86_64/fpu/s_floorl.S1
-rw-r--r--sysdeps/x86_64/fpu/s_log1pl.S1
-rw-r--r--sysdeps/x86_64/fpu/s_scalbnl.S3
-rw-r--r--sysdeps/x86_64/fpu/s_sincosf.S1
-rw-r--r--sysdeps/x86_64/fpu/s_truncl.S1
-rw-r--r--sysdeps/x86_64/memrchr.S1
-rw-r--r--sysdeps/x86_64/multiarch/memrchr.c8
-rw-r--r--sysdeps/x86_64/multiarch/strchrnul.c10
-rw-r--r--sysdeps/x86_64/multiarch/strncase.c12
-rw-r--r--sysdeps/x86_64/multiarch/wcslen.c11
-rw-r--r--sysdeps/x86_64/multiarch/wcsnlen.c10
-rw-r--r--sysdeps/x86_64/strchrnul.S1
-rw-r--r--sysdeps/x86_64/wcslen.S2
129 files changed, 391 insertions, 206 deletions
diff --git a/sysdeps/aarch64/strchrnul.S b/sysdeps/aarch64/strchrnul.S
index e13ace5b7e..51b50db3a2 100644
--- a/sysdeps/aarch64/strchrnul.S
+++ b/sysdeps/aarch64/strchrnul.S
@@ -128,4 +128,5 @@ L(tail):
 	ret
 
 END(__strchrnul)
+libc_hidden_def (__strchrnul)
 weak_alias (__strchrnul, strchrnul)
diff --git a/sysdeps/generic/math_private.h b/sysdeps/generic/math_private.h
index ecb37394fb..70550dcfca 100644
--- a/sysdeps/generic/math_private.h
+++ b/sysdeps/generic/math_private.h
@@ -250,18 +250,27 @@ fabsf128 (_Float128 x)
 
 
 /* Prototypes for functions of the IBM Accurate Mathematical Library.  */
-extern double __exp1 (double __x, double __xx);
-extern double __sin (double __x);
-extern double __cos (double __x);
-extern int __branred (double __x, double *__a, double *__aa);
-extern void __doasin (double __x, double __dx, double __v[]);
-extern void __dubsin (double __x, double __dx, double __v[]);
-extern void __dubcos (double __x, double __dx, double __v[]);
-extern double __sin32 (double __x, double __res, double __res1);
-extern double __cos32 (double __x, double __res, double __res1);
-extern double __mpsin (double __x, double __dx, bool __range_reduce);
-extern double __mpcos (double __x, double __dx, bool __range_reduce);
-extern void __docos (double __x, double __dx, double __v[]);
+extern double __exp1 (double __x, double __xx) attribute_hidden;
+extern double __sin (double __x) attribute_hidden;
+extern double __cos (double __x) attribute_hidden;
+extern int __branred (double __x, double *__a, double *__aa)
+  attribute_hidden;
+extern void __doasin (double __x, double __dx, double __v[])
+  attribute_hidden;
+extern void __dubsin (double __x, double __dx, double __v[])
+  attribute_hidden;
+extern void __dubcos (double __x, double __dx, double __v[])
+  attribute_hidden;
+extern double __sin32 (double __x, double __res, double __res1)
+  attribute_hidden;
+extern double __cos32 (double __x, double __res, double __res1)
+  attribute_hidden;
+extern double __mpsin (double __x, double __dx, bool __range_reduce)
+  attribute_hidden;
+extern double __mpcos (double __x, double __dx, bool __range_reduce)
+  attribute_hidden;
+extern void __docos (double __x, double __dx, double __v[])
+  attribute_hidden;
 
 #ifndef math_opt_barrier
 # define math_opt_barrier(x) \
diff --git a/sysdeps/generic/math_private_calls.h b/sysdeps/generic/math_private_calls.h
index 16b4ea3736..72f4e3bbf7 100644
--- a/sysdeps/generic/math_private_calls.h
+++ b/sysdeps/generic/math_private_calls.h
@@ -25,58 +25,73 @@
 #define __MSUF_R(x) __MSUF_R_S (x, _MSUF_)
 
 /* IEEE style elementary functions.  */
-extern _Mdouble_ __MSUF (__ieee754_acos) (_Mdouble_);
-extern _Mdouble_ __MSUF (__ieee754_acosh) (_Mdouble_);
-extern _Mdouble_ __MSUF (__ieee754_asin) (_Mdouble_);
-extern _Mdouble_ __MSUF (__ieee754_atan2) (_Mdouble_, _Mdouble_);
-extern _Mdouble_ __MSUF (__ieee754_atanh) (_Mdouble_);
-extern _Mdouble_ __MSUF (__ieee754_cosh) (_Mdouble_);
-extern _Mdouble_ __MSUF (__ieee754_exp) (_Mdouble_);
-extern _Mdouble_ __MSUF (__ieee754_exp10) (_Mdouble_);
-extern _Mdouble_ __MSUF (__ieee754_exp2) (_Mdouble_);
-extern _Mdouble_ __MSUF (__ieee754_fmod) (_Mdouble_, _Mdouble_);
-extern _Mdouble_ __MSUF (__ieee754_gamma) (_Mdouble_);
-extern _Mdouble_ __MSUF_R (__ieee754_gamma) (_Mdouble_, int *);
-extern _Mdouble_ __MSUF (__ieee754_hypot) (_Mdouble_, _Mdouble_);
-extern _Mdouble_ __MSUF (__ieee754_j0) (_Mdouble_);
-extern _Mdouble_ __MSUF (__ieee754_j1) (_Mdouble_);
-extern _Mdouble_ __MSUF (__ieee754_jn) (int, _Mdouble_);
-extern _Mdouble_ __MSUF (__ieee754_lgamma) (_Mdouble_);
-extern _Mdouble_ __MSUF_R (__ieee754_lgamma) (_Mdouble_, int *);
-extern _Mdouble_ __MSUF (__ieee754_log) (_Mdouble_);
-extern _Mdouble_ __MSUF (__ieee754_log10) (_Mdouble_);
-extern _Mdouble_ __MSUF (__ieee754_log2) (_Mdouble_);
-extern _Mdouble_ __MSUF (__ieee754_pow) (_Mdouble_, _Mdouble_);
-extern _Mdouble_ __MSUF (__ieee754_remainder) (_Mdouble_, _Mdouble_);
-extern _Mdouble_ __MSUF (__ieee754_sinh) (_Mdouble_);
-extern _Mdouble_ __MSUF (__ieee754_sqrt) (_Mdouble_);
-extern _Mdouble_ __MSUF (__ieee754_y0) (_Mdouble_);
-extern _Mdouble_ __MSUF (__ieee754_y1) (_Mdouble_);
-extern _Mdouble_ __MSUF (__ieee754_yn) (int, _Mdouble_);
-
-extern _Mdouble_ __MSUF (__ieee754_scalb) (_Mdouble_, _Mdouble_);
-extern int __MSUF (__ieee754_ilogb) (_Mdouble_);
-
-extern int32_t __MSUF (__ieee754_rem_pio2) (_Mdouble_, _Mdouble_ *);
+extern _Mdouble_ __MSUF (__ieee754_acos) (_Mdouble_) attribute_hidden;
+extern _Mdouble_ __MSUF (__ieee754_acosh) (_Mdouble_) attribute_hidden;
+extern _Mdouble_ __MSUF (__ieee754_asin) (_Mdouble_) attribute_hidden;
+extern _Mdouble_ __MSUF (__ieee754_atan2) (_Mdouble_, _Mdouble_)
+  attribute_hidden;
+extern _Mdouble_ __MSUF (__ieee754_atanh) (_Mdouble_) attribute_hidden;
+extern _Mdouble_ __MSUF (__ieee754_cosh) (_Mdouble_) attribute_hidden;
+extern _Mdouble_ __MSUF (__ieee754_exp) (_Mdouble_) attribute_hidden;
+extern _Mdouble_ __MSUF (__ieee754_exp10) (_Mdouble_) attribute_hidden;
+extern _Mdouble_ __MSUF (__ieee754_exp2) (_Mdouble_) attribute_hidden;
+extern _Mdouble_ __MSUF (__ieee754_fmod) (_Mdouble_, _Mdouble_)
+  attribute_hidden;
+extern _Mdouble_ __MSUF (__ieee754_gamma) (_Mdouble_) attribute_hidden;
+extern _Mdouble_ __MSUF_R (__ieee754_gamma) (_Mdouble_, int *)
+  attribute_hidden;
+extern _Mdouble_ __MSUF (__ieee754_hypot) (_Mdouble_, _Mdouble_)
+  attribute_hidden;
+extern _Mdouble_ __MSUF (__ieee754_j0) (_Mdouble_) attribute_hidden;
+extern _Mdouble_ __MSUF (__ieee754_j1) (_Mdouble_) attribute_hidden;
+extern _Mdouble_ __MSUF (__ieee754_jn) (int, _Mdouble_) attribute_hidden;
+extern _Mdouble_ __MSUF (__ieee754_lgamma) (_Mdouble_) attribute_hidden;
+extern _Mdouble_ __MSUF_R (__ieee754_lgamma) (_Mdouble_, int *)
+  attribute_hidden;
+extern _Mdouble_ __MSUF (__ieee754_log) (_Mdouble_) attribute_hidden;
+extern _Mdouble_ __MSUF (__ieee754_log10) (_Mdouble_) attribute_hidden;
+extern _Mdouble_ __MSUF (__ieee754_log2) (_Mdouble_) attribute_hidden;
+extern _Mdouble_ __MSUF (__ieee754_pow) (_Mdouble_, _Mdouble_)
+  attribute_hidden;
+extern _Mdouble_ __MSUF (__ieee754_remainder) (_Mdouble_, _Mdouble_)
+  attribute_hidden;
+extern _Mdouble_ __MSUF (__ieee754_sinh) (_Mdouble_) attribute_hidden;
+extern _Mdouble_ __MSUF (__ieee754_sqrt) (_Mdouble_) attribute_hidden;
+extern _Mdouble_ __MSUF (__ieee754_y0) (_Mdouble_) attribute_hidden;
+extern _Mdouble_ __MSUF (__ieee754_y1) (_Mdouble_) attribute_hidden;
+extern _Mdouble_ __MSUF (__ieee754_yn) (int, _Mdouble_) attribute_hidden;
+
+extern _Mdouble_ __MSUF (__ieee754_scalb) (_Mdouble_, _Mdouble_)
+  attribute_hidden;
+extern int __MSUF (__ieee754_ilogb) (_Mdouble_) attribute_hidden;
+
+extern int32_t __MSUF (__ieee754_rem_pio2) (_Mdouble_, _Mdouble_ *)
+  attribute_hidden;
 
 /* fdlibm kernel functions.  */
-extern _Mdouble_ __MSUF (__kernel_sin) (_Mdouble_, _Mdouble_, int);
-extern _Mdouble_ __MSUF (__kernel_cos) (_Mdouble_, _Mdouble_);
-extern _Mdouble_ __MSUF (__kernel_tan) (_Mdouble_, _Mdouble_, int);
+extern _Mdouble_ __MSUF (__kernel_sin) (_Mdouble_, _Mdouble_, int)
+  attribute_hidden;
+extern _Mdouble_ __MSUF (__kernel_cos) (_Mdouble_, _Mdouble_)
+  attribute_hidden;
+extern _Mdouble_ __MSUF (__kernel_tan) (_Mdouble_, _Mdouble_, int)
+  attribute_hidden;
 
 #if defined __MATH_DECLARING_LONG_DOUBLE || defined __MATH_DECLARING_FLOATN
 extern void __MSUF (__kernel_sincos) (_Mdouble_, _Mdouble_,
-				      _Mdouble_ *, _Mdouble_ *, int);
+				      _Mdouble_ *, _Mdouble_ *, int)
+  attribute_hidden;
 #endif
 
 #if !defined __MATH_DECLARING_LONG_DOUBLE || defined __MATH_DECLARING_FLOATN
 extern int __MSUF (__kernel_rem_pio2) (_Mdouble_ *, _Mdouble_ *, int,
-				       int, int, const int32_t *);
+				       int, int, const int32_t *)
+  attribute_hidden;
 #endif
 
 /* Internal functions.  */
 #if !defined __MATH_DECLARING_LONG_DOUBLE || !defined NO_LONG_DOUBLE
-extern _Mdouble_ __MSUF (__copysign) (_Mdouble_ x, _Mdouble_ __y);
+extern _Mdouble_ __MSUF (__copysign) (_Mdouble_ x, _Mdouble_ __y)
+  attribute_hidden;
 
 extern inline _Mdouble_
 __MSUF (__copysign) (_Mdouble_ x, _Mdouble_ __y)
@@ -88,7 +103,8 @@ __MSUF (__copysign) (_Mdouble_ x, _Mdouble_ __y)
 /* Return X^2 + Y^2 - 1, computed without large cancellation error.
    It is given that 1 > X >= Y >= epsilon / 2, and that X^2 + Y^2 >=
    0.5.  */
-extern _Mdouble_ __MSUF (__x2y2m1) (_Mdouble_ x, _Mdouble_ y);
+extern _Mdouble_ __MSUF (__x2y2m1) (_Mdouble_ x, _Mdouble_ y)
+  attribute_hidden;
 
 /* Compute the product of X + X_EPS, X + X_EPS + 1, ..., X + X_EPS + N
    - 1, in the form R * (1 + *EPS) where the return value R is an
@@ -98,12 +114,14 @@ extern _Mdouble_ __MSUF (__x2y2m1) (_Mdouble_ x, _Mdouble_ y);
    X is small enough that factors quadratic in it can be
    neglected.  */
 extern _Mdouble_ __MSUF (__gamma_product) (_Mdouble_ x, _Mdouble_ x_eps,
-					   int n, _Mdouble_ *eps);
+					   int n, _Mdouble_ *eps)
+  attribute_hidden;
 
 /* Compute lgamma of a negative argument X, if it is in a range
    (depending on the floating-point format) for which expansion around
    zeros is used, setting *SIGNGAMP accordingly.  */
-extern _Mdouble_ __MSUF (__lgamma_neg) (_Mdouble_ x, int *signgamp);
+extern _Mdouble_ __MSUF (__lgamma_neg) (_Mdouble_ x, int *signgamp)
+  attribute_hidden;
 
 /* Compute the product of 1 + (T / (X + X_EPS)), 1 + (T / (X + X_EPS +
    1)), ..., 1 + (T / (X + X_EPS + N - 1)), minus 1.  X is such that
@@ -112,7 +130,8 @@ extern _Mdouble_ __MSUF (__lgamma_neg) (_Mdouble_ x, int *signgamp);
    neglected.  */
 #if !defined __MATH_DECLARING_FLOAT
 extern _Mdouble_ __MSUF (__lgamma_product) (_Mdouble_ t, _Mdouble_ x,
-					    _Mdouble_ x_eps, int n);
+					    _Mdouble_ x_eps, int n)
+  attribute_hidden;
 #endif
 
 #undef __MSUF_X
diff --git a/sysdeps/gnu/glob-lstat-compat.c b/sysdeps/gnu/glob-lstat-compat.c
index 7cb52d4fee..8f7d775e6a 100644
--- a/sysdeps/gnu/glob-lstat-compat.c
+++ b/sysdeps/gnu/glob-lstat-compat.c
@@ -20,6 +20,8 @@
 #include <sys/stat.h>
 #include <shlib-compat.h>
 
+#if SHLIB_COMPAT(libc, GLIBC_2_0, GLIBC_2_27)
+
 #define glob64 __no_glob64_decl
 #include <glob.h>
 #undef glob64
@@ -33,6 +35,6 @@
 
 #include <posix/glob.c>
 
-#if SHLIB_COMPAT(libc, GLIBC_2_0, GLIBC_2_27)
+libc_hidden_def (__glob_lstat_compat)
 compat_symbol (libc, __glob_lstat_compat, glob, GLIBC_2_0);
 #endif
diff --git a/sysdeps/i386/fpu/s_rintl.c b/sysdeps/i386/fpu/s_rintl.c
index 5900435af9..0d96296902 100644
--- a/sysdeps/i386/fpu/s_rintl.c
+++ b/sysdeps/i386/fpu/s_rintl.c
@@ -4,8 +4,9 @@
  * Public domain.
  */
 
-#include <libm-alias-ldouble.h>
+#include <math.h>
 #include <math_private.h>
+#include <libm-alias-ldouble.h>
 
 long double
 __rintl (long double x)
@@ -15,5 +16,5 @@ __rintl (long double x)
   asm ("frndint" : "=t" (res) : "0" (x));
   return res;
 }
-
+libm_hidden_def (__rintl)
 libm_alias_ldouble (__rint, rint)
diff --git a/sysdeps/i386/i686/multiarch/memrchr.c b/sysdeps/i386/i686/multiarch/memrchr.c
index 1c0d9caf55..9e839ed39e 100644
--- a/sysdeps/i386/i686/multiarch/memrchr.c
+++ b/sysdeps/i386/i686/multiarch/memrchr.c
@@ -17,16 +17,17 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
+#include <string.h>
+
 /* Define multiple versions only for the definition in libc.  */
 #if IS_IN (libc)
-# define memrchr __redirect_memrchr
-# include <string.h>
-# undef memrchr
+
+extern typeof (__memrchr) __redirect_memrchr;
 
 # define SYMBOL_NAME memrchr
 # include "ifunc-sse2-bsf.h"
 
 libc_ifunc_redirected (__redirect_memrchr, __memrchr, IFUNC_SELECTOR ());
-
+libc_hidden_def (__memrchr)
 weak_alias (__memrchr, memrchr)
 #endif
diff --git a/sysdeps/i386/i686/multiarch/strncase.c b/sysdeps/i386/i686/multiarch/strncase.c
index 12c3b82e12..0f50506805 100644
--- a/sysdeps/i386/i686/multiarch/strncase.c
+++ b/sysdeps/i386/i686/multiarch/strncase.c
@@ -30,6 +30,6 @@
 
 libc_ifunc_redirected (__redirect_strncasecmp, __strncasecmp,
 		       IFUNC_SELECTOR ());
-
+libc_hidden_def (__strncasecmp)
 weak_alias (__strncasecmp, strncasecmp)
 #endif
diff --git a/sysdeps/i386/i686/multiarch/wcslen.c b/sysdeps/i386/i686/multiarch/wcslen.c
index 9f1b238a44..bc2a6e5047 100644
--- a/sysdeps/i386/i686/multiarch/wcslen.c
+++ b/sysdeps/i386/i686/multiarch/wcslen.c
@@ -17,15 +17,17 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
+#include <wchar.h>
+
 /* Define multiple versions only for the definition in libc.  */
 #if IS_IN (libc)
-# define __wcslen __redirect_wcslen
-# include <wchar.h>
-# undef __wcslen
+
+extern typeof (__wcslen) __redirect_wcslen;
 
 # define SYMBOL_NAME wcslen
 # include "ifunc-sse2.h"
 
 libc_ifunc_redirected (__redirect_wcslen, __wcslen, IFUNC_SELECTOR ());
-weak_alias (__wcslen, wcslen);
+libc_hidden_def (__wcslen)
+weak_alias (__wcslen, wcslen)
 #endif
diff --git a/sysdeps/i386/strchrnul.S b/sysdeps/i386/strchrnul.S
index 80a4d2a9ab..3afe4833c5 100644
--- a/sysdeps/i386/strchrnul.S
+++ b/sysdeps/i386/strchrnul.S
@@ -274,5 +274,5 @@ L(6):	popl %edi		/* restore saved register content */
 
 	ret
 END (__strchrnul)
-
+libc_hidden_def (__strchrnul)
 weak_alias (__strchrnul, strchrnul)
diff --git a/sysdeps/ieee754/dbl-64/mpa.h b/sysdeps/ieee754/dbl-64/mpa.h
index 1e188de4d1..ce503d22fa 100644
--- a/sysdeps/ieee754/dbl-64/mpa.h
+++ b/sysdeps/ieee754/dbl-64/mpa.h
@@ -35,6 +35,9 @@
 /* Common types and definition                                          */
 /************************************************************************/
 
+#ifndef _MPA_H
+#define _MPA_H 1
+
 #include <mpa-arch.h>
 
 /* The mp_no structure holds the details of a multi-precision floating point
@@ -106,18 +109,26 @@ extern const mp_no __mptwo;
 #define  HALF      0x1.0p-1		/* 1/2 */
 #define  MHALF     -0x1.0p-1		/* -1/2 */
 
-int __acr (const mp_no *, const mp_no *, int);
-void __cpy (const mp_no *, mp_no *, int);
-void __mp_dbl (const mp_no *, double *, int);
-void __dbl_mp (double, mp_no *, int);
-void __add (const mp_no *, const mp_no *, mp_no *, int);
-void __sub (const mp_no *, const mp_no *, mp_no *, int);
-void __mul (const mp_no *, const mp_no *, mp_no *, int);
-void __sqr (const mp_no *, mp_no *, int);
-void __dvd (const mp_no *, const mp_no *, mp_no *, int);
-
-extern void __mpatan (mp_no *, mp_no *, int);
-extern void __mpatan2 (mp_no *, mp_no *, mp_no *, int);
-extern void __mpsqrt (mp_no *, mp_no *, int);
-extern void __c32 (mp_no *, mp_no *, mp_no *, int);
-extern int __mpranred (double, mp_no *, int);
+int __acr (const mp_no *, const mp_no *, int) attribute_hidden;
+void __cpy (const mp_no *, mp_no *, int) attribute_hidden;
+void __mp_dbl (const mp_no *, double *, int) attribute_hidden;
+void __dbl_mp (double, mp_no *, int) attribute_hidden;
+void __add (const mp_no *, const mp_no *, mp_no *, int)
+  attribute_hidden;
+void __sub (const mp_no *, const mp_no *, mp_no *, int)
+  attribute_hidden;
+void __mul (const mp_no *, const mp_no *, mp_no *, int)
+  attribute_hidden;
+void __sqr (const mp_no *, mp_no *, int)
+  attribute_hidden;
+void __dvd (const mp_no *, const mp_no *, mp_no *, int)
+  attribute_hidden;
+
+extern void __mpatan (mp_no *, mp_no *, int) attribute_hidden;
+extern void __mpatan2 (mp_no *, mp_no *, mp_no *, int) attribute_hidden;
+extern void __mpsqrt (mp_no *, mp_no *, int) attribute_hidden;
+extern void __mptan (double, mp_no *, int) attribute_hidden;
+extern void __c32 (mp_no *, mp_no *, mp_no *, int) attribute_hidden;
+extern int __mpranred (double, mp_no *, int) attribute_hidden;
+
+#endif
diff --git a/sysdeps/ieee754/dbl-64/s_erf.c b/sysdeps/ieee754/dbl-64/s_erf.c
index 78287fd1cb..7c8e4e15f8 100644
--- a/sysdeps/ieee754/dbl-64/s_erf.c
+++ b/sysdeps/ieee754/dbl-64/s_erf.c
@@ -295,6 +295,7 @@ __erf (double x)
   else
     return r / x - one;
 }
+libm_hidden_def (__erf)
 libm_alias_double (__erf, erf)
 
 double
@@ -418,4 +419,5 @@ __erfc (double x)
 	return two - tiny;
     }
 }
+libm_hidden_def (__erfc)
 libm_alias_double (__erfc, erfc)
diff --git a/sysdeps/ieee754/dbl-64/s_expm1.c b/sysdeps/ieee754/dbl-64/s_expm1.c
index 3e136e7ee0..e0e05bad55 100644
--- a/sysdeps/ieee754/dbl-64/s_expm1.c
+++ b/sysdeps/ieee754/dbl-64/s_expm1.c
@@ -256,4 +256,5 @@ __expm1 (double x)
     }
   return y;
 }
+libm_hidden_def (__expm1)
 libm_alias_double (__expm1, expm1)
diff --git a/sysdeps/ieee754/dbl-64/s_nextup.c b/sysdeps/ieee754/dbl-64/s_nextup.c
index db13a5793b..3f5783eddb 100644
--- a/sysdeps/ieee754/dbl-64/s_nextup.c
+++ b/sysdeps/ieee754/dbl-64/s_nextup.c
@@ -51,5 +51,5 @@ __nextup (double x)
   INSERT_WORDS (x, hx, lx);
   return x;
 }
-
+libm_hidden_def (__nextup)
 libm_alias_double (__nextup, nextup)
diff --git a/sysdeps/ieee754/dbl-64/s_sincos.c b/sysdeps/ieee754/dbl-64/s_sincos.c
index e1977ea7e9..6bcb8de8a5 100644
--- a/sysdeps/ieee754/dbl-64/s_sincos.c
+++ b/sysdeps/ieee754/dbl-64/s_sincos.c
@@ -107,4 +107,5 @@ __sincos (double x, double *sinx, double *cosx)
 
   *sinx = *cosx = x / x;
 }
+libm_hidden_def (__sincos)
 libm_alias_double (__sincos, sincos)
diff --git a/sysdeps/ieee754/dbl-64/wordsize-64/s_frexp.c b/sysdeps/ieee754/dbl-64/wordsize-64/s_frexp.c
index c73434f5f3..5a60efc853 100644
--- a/sysdeps/ieee754/dbl-64/wordsize-64/s_frexp.c
+++ b/sysdeps/ieee754/dbl-64/wordsize-64/s_frexp.c
@@ -63,4 +63,5 @@ __frexp (double x, int *eptr)
   *eptr = e;
   return x;
 }
+libm_hidden_def (__frexp)
 libm_alias_double (__frexp, frexp)
diff --git a/sysdeps/ieee754/dbl-64/wordsize-64/s_nearbyint.c b/sysdeps/ieee754/dbl-64/wordsize-64/s_nearbyint.c
index 5d1f98e471..1f9e179981 100644
--- a/sysdeps/ieee754/dbl-64/wordsize-64/s_nearbyint.c
+++ b/sysdeps/ieee754/dbl-64/wordsize-64/s_nearbyint.c
@@ -60,4 +60,5 @@ __nearbyint(double x)
 	libc_fesetenv (&env);
 	return t;
 }
+libm_hidden_def (__nearbyint)
 libm_alias_double (__nearbyint, nearbyint)
diff --git a/sysdeps/ieee754/dbl-64/wordsize-64/s_round.c b/sysdeps/ieee754/dbl-64/wordsize-64/s_round.c
index 3323621ce3..7d6b3ac122 100644
--- a/sysdeps/ieee754/dbl-64/wordsize-64/s_round.c
+++ b/sysdeps/ieee754/dbl-64/wordsize-64/s_round.c
@@ -62,4 +62,5 @@ __round (double x)
   INSERT_WORDS64 (x, i0);
   return x;
 }
+libm_hidden_def (__round)
 libm_alias_double (__round, round)
diff --git a/sysdeps/ieee754/flt-32/s_atanf.c b/sysdeps/ieee754/flt-32/s_atanf.c
index 03a4cfd6a5..b095b85438 100644
--- a/sysdeps/ieee754/flt-32/s_atanf.c
+++ b/sysdeps/ieee754/flt-32/s_atanf.c
@@ -99,4 +99,5 @@ float __atanf(float x)
 	    return (hx<0)? -z:z;
 	}
 }
+libm_hidden_def (__atanf)
 libm_alias_float (__atan, atan)
diff --git a/sysdeps/ieee754/flt-32/s_ceilf.c b/sysdeps/ieee754/flt-32/s_ceilf.c
index f289ec2341..08005572e2 100644
--- a/sysdeps/ieee754/flt-32/s_ceilf.c
+++ b/sysdeps/ieee754/flt-32/s_ceilf.c
@@ -44,6 +44,7 @@ __ceilf(float x)
 	SET_FLOAT_WORD(x,i0);
 	return x;
 }
+libm_hidden_def (__ceilf)
 #ifndef __ceilf
 libm_alias_float (__ceil, ceil)
 #endif
diff --git a/sysdeps/ieee754/flt-32/s_erff.c b/sysdeps/ieee754/flt-32/s_erff.c
index 6eacf0f5fc..60ff3a0a3c 100644
--- a/sysdeps/ieee754/flt-32/s_erff.c
+++ b/sysdeps/ieee754/flt-32/s_erff.c
@@ -153,6 +153,7 @@ float __erff(float x)
 	r  =  __ieee754_expf(-z*z-(float)0.5625)*__ieee754_expf((z-x)*(z+x)+R/S);
 	if(hx>=0) return one-r/x; else return  r/x-one;
 }
+libm_hidden_def (__erff)
 libm_alias_float (__erf, erf)
 
 float __erfcf(float x)
@@ -228,4 +229,5 @@ float __erfcf(float x)
 		return two-tiny;
 	}
 }
+libm_hidden_def (__erfcf)
 libm_alias_float (__erfc, erfc)
diff --git a/sysdeps/ieee754/flt-32/s_expm1f.c b/sysdeps/ieee754/flt-32/s_expm1f.c
index 0358970778..a63be37aef 100644
--- a/sysdeps/ieee754/flt-32/s_expm1f.c
+++ b/sysdeps/ieee754/flt-32/s_expm1f.c
@@ -128,4 +128,5 @@ __expm1f(float x)
 	}
 	return y;
 }
+libm_hidden_def (__expm1f)
 libm_alias_float (__expm1, expm1)
diff --git a/sysdeps/ieee754/flt-32/s_floorf.c b/sysdeps/ieee754/flt-32/s_floorf.c
index 12aed343a0..c7e583e1f9 100644
--- a/sysdeps/ieee754/flt-32/s_floorf.c
+++ b/sysdeps/ieee754/flt-32/s_floorf.c
@@ -50,6 +50,7 @@ __floorf(float x)
 	SET_FLOAT_WORD(x,i0);
 	return x;
 }
+libm_hidden_def (__floorf)
 #ifndef __floorf
 libm_alias_float (__floor, floor)
 #endif
diff --git a/sysdeps/ieee754/flt-32/s_frexpf.c b/sysdeps/ieee754/flt-32/s_frexpf.c
index b7403bf0d8..d39e980949 100644
--- a/sysdeps/ieee754/flt-32/s_frexpf.c
+++ b/sysdeps/ieee754/flt-32/s_frexpf.c
@@ -42,4 +42,5 @@ float __frexpf(float x, int *eptr)
 	SET_FLOAT_WORD(x,hx);
 	return x;
 }
+libm_hidden_def (__frexpf)
 libm_alias_float (__frexp, frexp)
diff --git a/sysdeps/ieee754/flt-32/s_nearbyintf.c b/sysdeps/ieee754/flt-32/s_nearbyintf.c
index a8af8948ec..6a7f5feae3 100644
--- a/sysdeps/ieee754/flt-32/s_nearbyintf.c
+++ b/sysdeps/ieee754/flt-32/s_nearbyintf.c
@@ -57,4 +57,5 @@ __nearbyintf(float x)
 	libc_fesetenvf (&env);
 	return t;
 }
+libm_hidden_def (__nearbyintf)
 libm_alias_float (__nearbyint, nearbyint)
diff --git a/sysdeps/ieee754/flt-32/s_nextupf.c b/sysdeps/ieee754/flt-32/s_nextupf.c
index 7ba8c0b79d..8fab441e56 100644
--- a/sysdeps/ieee754/flt-32/s_nextupf.c
+++ b/sysdeps/ieee754/flt-32/s_nextupf.c
@@ -43,5 +43,5 @@ __nextupf (float x)
   SET_FLOAT_WORD (x, hx);
   return x;
 }
-
+libm_hidden_def (__nextupf)
 libm_alias_float (__nextup, nextup)
diff --git a/sysdeps/ieee754/flt-32/s_rintf.c b/sysdeps/ieee754/flt-32/s_rintf.c
index db6f260a0b..71f747a47d 100644
--- a/sysdeps/ieee754/flt-32/s_rintf.c
+++ b/sysdeps/ieee754/flt-32/s_rintf.c
@@ -46,6 +46,7 @@ __rintf(float x)
 	w = TWO23[sx]+x;
 	return w-TWO23[sx];
 }
+libm_hidden_def (__rintf)
 #ifndef __rintf
 libm_alias_float (__rint, rint)
 #endif
diff --git a/sysdeps/ieee754/flt-32/s_roundevenf.c b/sysdeps/ieee754/flt-32/s_roundevenf.c
index 90f991d5c4..fa8d0bab49 100644
--- a/sysdeps/ieee754/flt-32/s_roundevenf.c
+++ b/sysdeps/ieee754/flt-32/s_roundevenf.c
@@ -67,4 +67,5 @@ __roundevenf (float x)
   SET_FLOAT_WORD (x, ix);
   return x;
 }
+libm_hidden_def (__roundevenf)
 libm_alias_float (__roundeven, roundeven)
diff --git a/sysdeps/ieee754/flt-32/s_roundf.c b/sysdeps/ieee754/flt-32/s_roundf.c
index 7c95125d9c..3c925c08f1 100644
--- a/sysdeps/ieee754/flt-32/s_roundf.c
+++ b/sysdeps/ieee754/flt-32/s_roundf.c
@@ -61,4 +61,5 @@ __roundf (float x)
   SET_FLOAT_WORD (x, i0);
   return x;
 }
+libm_hidden_def (__roundf)
 libm_alias_float (__round, round)
diff --git a/sysdeps/ieee754/flt-32/s_truncf.c b/sysdeps/ieee754/flt-32/s_truncf.c
index 2e1464aeac..8d4605f3eb 100644
--- a/sysdeps/ieee754/flt-32/s_truncf.c
+++ b/sysdeps/ieee754/flt-32/s_truncf.c
@@ -49,6 +49,7 @@ __truncf (float x)
 
   return x;
 }
+libm_hidden_def (__truncf)
 #ifndef __truncf
 libm_alias_float (__trunc, trunc)
 #endif
diff --git a/sysdeps/ieee754/ldbl-128/s_atanl.c b/sysdeps/ieee754/ldbl-128/s_atanl.c
index e05368df53..6de128201d 100644
--- a/sysdeps/ieee754/ldbl-128/s_atanl.c
+++ b/sysdeps/ieee754/ldbl-128/s_atanl.c
@@ -250,5 +250,5 @@ __atanl (_Float128 x)
   else
     return u;
 }
-
+libm_hidden_def (__atanl)
 libm_alias_ldouble (__atan, atan)
diff --git a/sysdeps/ieee754/ldbl-128/s_ceill.c b/sysdeps/ieee754/ldbl-128/s_ceill.c
index e6aba5f2af..3e68a6cde7 100644
--- a/sysdeps/ieee754/ldbl-128/s_ceill.c
+++ b/sysdeps/ieee754/ldbl-128/s_ceill.c
@@ -64,4 +64,5 @@ _Float128 __ceill(_Float128 x)
 	SET_LDOUBLE_WORDS64(x,i0,i1);
 	return x;
 }
+libm_hidden_def (__ceill)
 libm_alias_ldouble (__ceil, ceil)
diff --git a/sysdeps/ieee754/ldbl-128/s_cosl.c b/sysdeps/ieee754/ldbl-128/s_cosl.c
index b315abccc5..6424f6d1f2 100644
--- a/sysdeps/ieee754/ldbl-128/s_cosl.c
+++ b/sysdeps/ieee754/ldbl-128/s_cosl.c
@@ -84,4 +84,5 @@ _Float128 __cosl(_Float128 x)
 	    }
 	}
 }
+libm_hidden_def (__cosl)
 libm_alias_ldouble (__cos, cos)
diff --git a/sysdeps/ieee754/ldbl-128/s_erfl.c b/sysdeps/ieee754/ldbl-128/s_erfl.c
index 88e91c702d..39c0b45934 100644
--- a/sysdeps/ieee754/ldbl-128/s_erfl.c
+++ b/sysdeps/ieee754/ldbl-128/s_erfl.c
@@ -803,8 +803,9 @@ __erfl (_Float128 x)
     y = -y;
   return( y );
 }
-
+libm_hidden_def (__erfl)
 libm_alias_ldouble (__erf, erf)
+
 _Float128
 __erfcl (_Float128 x)
 {
@@ -945,5 +946,5 @@ __erfcl (_Float128 x)
 	return two - tiny;
     }
 }
-
+libm_hidden_def (__erfcl)
 libm_alias_ldouble (__erfc, erfc)
diff --git a/sysdeps/ieee754/ldbl-128/s_floorl.c b/sysdeps/ieee754/ldbl-128/s_floorl.c
index f9c5e014f9..6f881618ff 100644
--- a/sysdeps/ieee754/ldbl-128/s_floorl.c
+++ b/sysdeps/ieee754/ldbl-128/s_floorl.c
@@ -65,4 +65,5 @@ _Float128 __floorl(_Float128 x)
 	SET_LDOUBLE_WORDS64(x,i0,i1);
 	return x;
 }
+libm_hidden_def (__floorl)
 libm_alias_ldouble (__floor, floor)
diff --git a/sysdeps/ieee754/ldbl-128/s_frexpl.c b/sysdeps/ieee754/ldbl-128/s_frexpl.c
index bab0779e23..d9fca42bb8 100644
--- a/sysdeps/ieee754/ldbl-128/s_frexpl.c
+++ b/sysdeps/ieee754/ldbl-128/s_frexpl.c
@@ -52,4 +52,5 @@ _Float128 __frexpl(_Float128 x, int *eptr)
 	SET_LDOUBLE_MSW64(x,hx);
 	return x;
 }
+libm_hidden_def (__frexpl)
 libm_alias_ldouble (__frexp, frexp)
diff --git a/sysdeps/ieee754/ldbl-128/s_nearbyintl.c b/sysdeps/ieee754/ldbl-128/s_nearbyintl.c
index 04b657d451..e7f617175d 100644
--- a/sysdeps/ieee754/ldbl-128/s_nearbyintl.c
+++ b/sysdeps/ieee754/ldbl-128/s_nearbyintl.c
@@ -65,4 +65,5 @@ _Float128 __nearbyintl(_Float128 x)
 	fesetenv (&env);
 	return t;
 }
+libm_hidden_def (__nearbyintl)
 libm_alias_ldouble (__nearbyint, nearbyint)
diff --git a/sysdeps/ieee754/ldbl-128/s_nextupl.c b/sysdeps/ieee754/ldbl-128/s_nextupl.c
index 5628c17680..5b40e6e91d 100644
--- a/sysdeps/ieee754/ldbl-128/s_nextupl.c
+++ b/sysdeps/ieee754/ldbl-128/s_nextupl.c
@@ -53,5 +53,5 @@ __nextupl (_Float128 x)
   SET_LDOUBLE_WORDS64 (x, hx, lx);
   return x;
 }
-
+libm_hidden_def (__nextupl)
 libm_alias_ldouble (__nextup, nextup)
diff --git a/sysdeps/ieee754/ldbl-128/s_rintl.c b/sysdeps/ieee754/ldbl-128/s_rintl.c
index 9e6637a225..4632adfeee 100644
--- a/sysdeps/ieee754/ldbl-128/s_rintl.c
+++ b/sysdeps/ieee754/ldbl-128/s_rintl.c
@@ -60,4 +60,5 @@ _Float128 __rintl(_Float128 x)
 	w = TWO112[sx]+x;
 	return w-TWO112[sx];
 }
+libm_hidden_def (__rintl)
 libm_alias_ldouble (__rint, rint)
diff --git a/sysdeps/ieee754/ldbl-128/s_roundevenl.c b/sysdeps/ieee754/ldbl-128/s_roundevenl.c
index 5fc59af4ee..12f4694b3f 100644
--- a/sysdeps/ieee754/ldbl-128/s_roundevenl.c
+++ b/sysdeps/ieee754/ldbl-128/s_roundevenl.c
@@ -101,4 +101,5 @@ __roundevenl (_Float128 x)
   SET_LDOUBLE_WORDS64 (x, hx, lx);
   return x;
 }
+libm_hidden_def (__roundevenl)
 libm_alias_ldouble (__roundeven, roundeven)
diff --git a/sysdeps/ieee754/ldbl-128/s_roundl.c b/sysdeps/ieee754/ldbl-128/s_roundl.c
index 22789cedf3..8d3e0b8713 100644
--- a/sysdeps/ieee754/ldbl-128/s_roundl.c
+++ b/sysdeps/ieee754/ldbl-128/s_roundl.c
@@ -78,4 +78,5 @@ __roundl (_Float128 x)
   SET_LDOUBLE_WORDS64 (x, i0, i1);
   return x;
 }
+libm_hidden_def (__roundl)
 libm_alias_ldouble (__round, round)
diff --git a/sysdeps/ieee754/ldbl-128/s_sincosl.c b/sysdeps/ieee754/ldbl-128/s_sincosl.c
index dfcb0be301..12718d6a62 100644
--- a/sysdeps/ieee754/ldbl-128/s_sincosl.c
+++ b/sysdeps/ieee754/ldbl-128/s_sincosl.c
@@ -71,4 +71,5 @@ __sincosl (_Float128 x, _Float128 *sinx, _Float128 *cosx)
 	}
     }
 }
+libm_hidden_def (__sincosl)
 libm_alias_ldouble (__sincos, sincos)
diff --git a/sysdeps/ieee754/ldbl-128/s_sinl.c b/sysdeps/ieee754/ldbl-128/s_sinl.c
index 773b2fa7ee..9736a09ad1 100644
--- a/sysdeps/ieee754/ldbl-128/s_sinl.c
+++ b/sysdeps/ieee754/ldbl-128/s_sinl.c
@@ -84,4 +84,5 @@ _Float128 __sinl(_Float128 x)
 	    }
 	}
 }
+libm_hidden_def (__sinl)
 libm_alias_ldouble (__sin, sin)
diff --git a/sysdeps/ieee754/ldbl-128/s_truncl.c b/sysdeps/ieee754/ldbl-128/s_truncl.c
index f858ede3d2..28d3c45876 100644
--- a/sysdeps/ieee754/ldbl-128/s_truncl.c
+++ b/sysdeps/ieee754/ldbl-128/s_truncl.c
@@ -54,4 +54,5 @@ __truncl (_Float128 x)
 
   return x;
 }
+libm_hidden_def (__truncl)
 libm_alias_ldouble (__trunc, trunc)
diff --git a/sysdeps/ieee754/ldbl-96/s_cosl.c b/sysdeps/ieee754/ldbl-96/s_cosl.c
index 324e5b9663..e56000e8ef 100644
--- a/sysdeps/ieee754/ldbl-96/s_cosl.c
+++ b/sysdeps/ieee754/ldbl-96/s_cosl.c
@@ -86,4 +86,5 @@ long double __cosl(long double x)
 	    }
 	}
 }
+libm_hidden_def (__cosl)
 libm_alias_ldouble (__cos, cos)
diff --git a/sysdeps/ieee754/ldbl-96/s_erfl.c b/sysdeps/ieee754/ldbl-96/s_erfl.c
index 0f8974085b..7ecadccae8 100644
--- a/sysdeps/ieee754/ldbl-96/s_erfl.c
+++ b/sysdeps/ieee754/ldbl-96/s_erfl.c
@@ -335,8 +335,9 @@ __erfl (long double x)
   else
     return r / x - one;
 }
-
+libm_hidden_def (__erfl)
 libm_alias_ldouble (__erf, erf)
+
 long double
 __erfcl (long double x)
 {
@@ -448,5 +449,5 @@ __erfcl (long double x)
 	return two - tiny;
     }
 }
-
+libm_hidden_def (__erfcl)
 libm_alias_ldouble (__erfc, erfc)
diff --git a/sysdeps/ieee754/ldbl-96/s_frexpl.c b/sysdeps/ieee754/ldbl-96/s_frexpl.c
index 7c31ed9936..98757f169b 100644
--- a/sysdeps/ieee754/ldbl-96/s_frexpl.c
+++ b/sysdeps/ieee754/ldbl-96/s_frexpl.c
@@ -59,4 +59,5 @@ long double __frexpl(long double x, int *eptr)
 	SET_LDOUBLE_EXP(x,se);
 	return x;
 }
+libm_hidden_def (__frexpl)
 libm_alias_ldouble (__frexp, frexp)
diff --git a/sysdeps/ieee754/ldbl-96/s_nextupl.c b/sysdeps/ieee754/ldbl-96/s_nextupl.c
index a1ca1fecee..13ade2d6a5 100644
--- a/sysdeps/ieee754/ldbl-96/s_nextupl.c
+++ b/sysdeps/ieee754/ldbl-96/s_nextupl.c
@@ -81,5 +81,5 @@ __nextupl (long double x)
   SET_LDOUBLE_WORDS (x, esx, hx, lx);
   return x;
 }
-
+libm_hidden_def (__nextupl)
 libm_alias_ldouble (__nextup, nextup)
diff --git a/sysdeps/ieee754/ldbl-96/s_roundevenl.c b/sysdeps/ieee754/ldbl-96/s_roundevenl.c
index be2e4fa49e..f00600c981 100644
--- a/sysdeps/ieee754/ldbl-96/s_roundevenl.c
+++ b/sysdeps/ieee754/ldbl-96/s_roundevenl.c
@@ -123,4 +123,5 @@ __roundevenl (long double x)
   SET_LDOUBLE_WORDS (x, se, hx, lx);
   return x;
 }
+libm_hidden_def (__roundevenl)
 libm_alias_ldouble (__roundeven, roundeven)
diff --git a/sysdeps/ieee754/ldbl-96/s_roundl.c b/sysdeps/ieee754/ldbl-96/s_roundl.c
index c5c304cb2e..4924b44b14 100644
--- a/sysdeps/ieee754/ldbl-96/s_roundl.c
+++ b/sysdeps/ieee754/ldbl-96/s_roundl.c
@@ -90,4 +90,5 @@ __roundl (long double x)
   SET_LDOUBLE_WORDS (x, se, i0, i1);
   return x;
 }
+libm_hidden_def (__roundl)
 libm_alias_ldouble (__round, round)
diff --git a/sysdeps/ieee754/ldbl-96/s_signbitl.c b/sysdeps/ieee754/ldbl-96/s_signbitl.c
index 19953c180a..e86d3dc61b 100644
--- a/sysdeps/ieee754/ldbl-96/s_signbitl.c
+++ b/sysdeps/ieee754/ldbl-96/s_signbitl.c
@@ -24,3 +24,6 @@ __signbitl (long double x)
 {
   return __builtin_signbitl (x);
 }
+#if IS_IN (libc) || IS_IN (libm)
+hidden_def (__signbitl)
+#endif
diff --git a/sysdeps/ieee754/ldbl-96/s_sincosl.c b/sysdeps/ieee754/ldbl-96/s_sincosl.c
index 355c25dba9..0648b2f31b 100644
--- a/sysdeps/ieee754/ldbl-96/s_sincosl.c
+++ b/sysdeps/ieee754/ldbl-96/s_sincosl.c
@@ -74,4 +74,5 @@ __sincosl (long double x, long double *sinx, long double *cosx)
 	}
     }
 }
+libm_hidden_def (__sincosl)
 libm_alias_ldouble (__sincos, sincos)
diff --git a/sysdeps/ieee754/ldbl-96/s_sinl.c b/sysdeps/ieee754/ldbl-96/s_sinl.c
index cfbe9bf153..01cdd0e3b5 100644
--- a/sysdeps/ieee754/ldbl-96/s_sinl.c
+++ b/sysdeps/ieee754/ldbl-96/s_sinl.c
@@ -86,4 +86,5 @@ long double __sinl(long double x)
 	    }
 	}
 }
+libm_hidden_def (__sinl)
 libm_alias_ldouble (__sin, sin)
diff --git a/sysdeps/m68k/strchrnul.S b/sysdeps/m68k/strchrnul.S
index ea157555c1..8dc25e7e13 100644
--- a/sysdeps/m68k/strchrnul.S
+++ b/sysdeps/m68k/strchrnul.S
@@ -263,5 +263,5 @@ L(L9:)
 	cfi_restore (R(d2))
 	rts
 END(__strchrnul)
-
+libc_hidden_def (__strchrnul)
 weak_alias (__strchrnul, strchrnul)
diff --git a/sysdeps/mach/hurd/dirfd.c b/sysdeps/mach/hurd/dirfd.c
index a184b72586..2dd3857054 100644
--- a/sysdeps/mach/hurd/dirfd.c
+++ b/sysdeps/mach/hurd/dirfd.c
@@ -42,4 +42,5 @@ __dirfd (DIR *dirp)
   return fd;
 }
 
+libc_hidden_def (__dirfd)
 weak_alias (__dirfd, dirfd)
diff --git a/sysdeps/posix/dirfd.c b/sysdeps/posix/dirfd.c
index e09a45d717..c140da28ec 100644
--- a/sysdeps/posix/dirfd.c
+++ b/sysdeps/posix/dirfd.c
@@ -26,5 +26,5 @@ __dirfd (DIR *dirp)
 {
   return dirp->fd;
 }
-
+libc_hidden_def (__dirfd)
 weak_alias (__dirfd, dirfd)
diff --git a/sysdeps/powerpc/powerpc32/power4/multiarch/memrchr.c b/sysdeps/powerpc/powerpc32/power4/multiarch/memrchr.c
index 46e20df350..b1d493852a 100644
--- a/sysdeps/powerpc/powerpc32/power4/multiarch/memrchr.c
+++ b/sysdeps/powerpc/powerpc32/power4/multiarch/memrchr.c
@@ -30,7 +30,7 @@ libc_ifunc (__memrchr,
 	    (hwcap & PPC_FEATURE_HAS_VSX)
             ? __memrchr_power7
             : __memrchr_ppc);
-
+libc_hidden_def (__memrchr)
 weak_alias (__memrchr, memrchr)
 #else
 #include <string/memrchr.c>
diff --git a/sysdeps/powerpc/powerpc32/power4/multiarch/strchrnul.c b/sysdeps/powerpc/powerpc32/power4/multiarch/strchrnul.c
index 527160f7eb..83635e8e8c 100644
--- a/sysdeps/powerpc/powerpc32/power4/multiarch/strchrnul.c
+++ b/sysdeps/powerpc/powerpc32/power4/multiarch/strchrnul.c
@@ -30,7 +30,7 @@ libc_ifunc (__strchrnul,
 	    (hwcap & PPC_FEATURE_HAS_VSX)
             ? __strchrnul_power7
             : __strchrnul_ppc);
-
+libc_hidden_def (__strchrnul)
 weak_alias (__strchrnul, strchrnul)
 #else
 #include <string/strchrnul.c>
diff --git a/sysdeps/powerpc/powerpc32/power7/memrchr.S b/sysdeps/powerpc/powerpc32/power7/memrchr.S
index aedae95914..31d6c51c48 100644
--- a/sysdeps/powerpc/powerpc32/power7/memrchr.S
+++ b/sysdeps/powerpc/powerpc32/power7/memrchr.S
@@ -194,3 +194,4 @@ L(loop_small):
 END (__memrchr)
 weak_alias (__memrchr, memrchr)
 libc_hidden_builtin_def (memrchr)
+libc_hidden_builtin_def (__memrchr)
diff --git a/sysdeps/powerpc/powerpc64/multiarch/memrchr.c b/sysdeps/powerpc/powerpc64/multiarch/memrchr.c
index 48be9515e4..973c800981 100644
--- a/sysdeps/powerpc/powerpc64/multiarch/memrchr.c
+++ b/sysdeps/powerpc/powerpc64/multiarch/memrchr.c
@@ -33,7 +33,7 @@ libc_ifunc (__memrchr,
 	      (hwcap & PPC_FEATURE_HAS_VSX)
 	      ? __memrchr_power7
 	    : __memrchr_ppc);
-
+libc_hidden_def (__memrchr)
 weak_alias (__memrchr, memrchr)
 #else
 #include <string/memrchr.c>
diff --git a/sysdeps/powerpc/powerpc64/multiarch/strchrnul.c b/sysdeps/powerpc/powerpc64/multiarch/strchrnul.c
index ead31f791c..fe6aeb4a8b 100644
--- a/sysdeps/powerpc/powerpc64/multiarch/strchrnul.c
+++ b/sysdeps/powerpc/powerpc64/multiarch/strchrnul.c
@@ -33,7 +33,7 @@ libc_ifunc (__strchrnul,
 	    (hwcap & PPC_FEATURE_HAS_VSX)
             ? __strchrnul_power7
             : __strchrnul_ppc);
-
+libc_hidden_def (__strchrnul)
 weak_alias (__strchrnul, strchrnul)
 #else
 #include <string/strchrnul.c>
diff --git a/sysdeps/powerpc/powerpc64/power7/memrchr.S b/sysdeps/powerpc/powerpc64/power7/memrchr.S
index 583d513c4c..ea88825d07 100644
--- a/sysdeps/powerpc/powerpc64/power7/memrchr.S
+++ b/sysdeps/powerpc/powerpc64/power7/memrchr.S
@@ -199,3 +199,4 @@ L(loop_small):
 END (MEMRCHR)
 weak_alias (__memrchr, memrchr)
 libc_hidden_builtin_def (memrchr)
+libc_hidden_builtin_def (__memrchr)
diff --git a/sysdeps/powerpc/powerpc64/power8/memrchr.S b/sysdeps/powerpc/powerpc64/power8/memrchr.S
index 54de6566bd..21a6a70cef 100644
--- a/sysdeps/powerpc/powerpc64/power8/memrchr.S
+++ b/sysdeps/powerpc/powerpc64/power8/memrchr.S
@@ -343,3 +343,4 @@ L(loop_small):
 END (MEMRCHR)
 weak_alias (__memrchr, memrchr)
 libc_hidden_builtin_def (memrchr)
+libc_hidden_builtin_def (__memrchr)
diff --git a/sysdeps/powerpc/powerpc64/power8/strchr.S b/sysdeps/powerpc/powerpc64/power8/strchr.S
index c5e28d9c9e..df7fa88a27 100644
--- a/sysdeps/powerpc/powerpc64/power8/strchr.S
+++ b/sysdeps/powerpc/powerpc64/power8/strchr.S
@@ -371,7 +371,11 @@ L(end1):
 	blr
 END (FUNC_NAME)
 
-#ifndef USE_AS_STRCHRNUL
+#ifdef USE_AS_STRCHRNUL
+#ifndef STRCHRNUL
+libc_hidden_builtin_def (__strchrnul)
+#endif
+#else
 weak_alias (strchr, index)
 libc_hidden_builtin_def (strchr)
 #endif
diff --git a/sysdeps/s390/multiarch/memrchr.c b/sysdeps/s390/multiarch/memrchr.c
index 43a44abcf6..4307a1ad32 100644
--- a/sysdeps/s390/multiarch/memrchr.c
+++ b/sysdeps/s390/multiarch/memrchr.c
@@ -21,6 +21,7 @@
 # include <ifunc-resolve.h>
 
 s390_vx_libc_ifunc (__memrchr)
+libc_hidden_def (__memrchr)
 weak_alias (__memrchr, memrchr)
 
 #else
diff --git a/sysdeps/s390/multiarch/strchrnul.c b/sysdeps/s390/multiarch/strchrnul.c
index 62dfc6bd90..35e9c5d6d0 100644
--- a/sysdeps/s390/multiarch/strchrnul.c
+++ b/sysdeps/s390/multiarch/strchrnul.c
@@ -21,6 +21,7 @@
 # include <ifunc-resolve.h>
 
 s390_vx_libc_ifunc (__strchrnul)
+libc_hidden_def (__strchrnul)
 weak_alias (__strchrnul, strchrnul)
 
 #else
diff --git a/sysdeps/s390/multiarch/wcslen.c b/sysdeps/s390/multiarch/wcslen.c
index 3a1d1a32c9..ad767728e5 100644
--- a/sysdeps/s390/multiarch/wcslen.c
+++ b/sysdeps/s390/multiarch/wcslen.c
@@ -21,6 +21,7 @@
 # include <ifunc-resolve.h>
 
 s390_vx_libc_ifunc (__wcslen)
+libc_hidden_def (__wcslen)
 weak_alias (__wcslen, wcslen)
 
 #else
diff --git a/sysdeps/s390/multiarch/wcsnlen.c b/sysdeps/s390/multiarch/wcsnlen.c
index 5234074b1f..025e8d537d 100644
--- a/sysdeps/s390/multiarch/wcsnlen.c
+++ b/sysdeps/s390/multiarch/wcsnlen.c
@@ -21,6 +21,7 @@
 # include <ifunc-resolve.h>
 
 s390_vx_libc_ifunc (__wcsnlen)
+libc_hidden_def (__wcsnlen)
 weak_alias (__wcsnlen, wcsnlen)
 
 #else
diff --git a/sysdeps/tile/strchrnul.c b/sysdeps/tile/strchrnul.c
index 2f425a2ff3..6c76ecb89b 100644
--- a/sysdeps/tile/strchrnul.c
+++ b/sysdeps/tile/strchrnul.c
@@ -61,4 +61,5 @@ __strchrnul (const char *s, int c)
     g = z;
   return ((char *) p) + (g >> 3);
 }
+libc_hidden_def (__strchrnul)
 weak_alias (__strchrnul, strchrnul)
diff --git a/sysdeps/unix/sysv/linux/arm/umount.c b/sysdeps/unix/sysv/linux/arm/umount.c
index 87997e029f..fcf3a51fc1 100644
--- a/sysdeps/unix/sysv/linux/arm/umount.c
+++ b/sysdeps/unix/sysv/linux/arm/umount.c
@@ -19,7 +19,7 @@
 /* Since we don't have an oldumount system call, do what the kernel
    does down here.  */
 
-extern long int __umount2 (const char *name, int flags);
+#include <mount-internal.h>
 
 long int
 __umount (const char *name)
diff --git a/sysdeps/unix/sysv/linux/generic/umount.c b/sysdeps/unix/sysv/linux/generic/umount.c
index 1c8bea55e0..d64272c6bb 100644
--- a/sysdeps/unix/sysv/linux/generic/umount.c
+++ b/sysdeps/unix/sysv/linux/generic/umount.c
@@ -19,7 +19,7 @@
 /* Since the generic Linux syscall ABI doesn't have an oldumount system call,
    do what the kernel does down here.  */
 
-extern long int __umount2 (const char *name, int flags);
+#include <mount-internal.h>
 
 long int
 __umount (const char *name)
diff --git a/sysdeps/unix/sysv/linux/glob-lstat-compat.c b/sysdeps/unix/sysv/linux/glob-lstat-compat.c
index 64dab9af52..e5a534027f 100644
--- a/sysdeps/unix/sysv/linux/glob-lstat-compat.c
+++ b/sysdeps/unix/sysv/linux/glob-lstat-compat.c
@@ -21,9 +21,23 @@
 #include <kernel_stat.h>
 #include <shlib-compat.h>
 
+#ifndef GLOB_LSTAT_VERSION
+# define GLOB_LSTAT_VERSION GLIBC_2_0
+#endif
+
+#if SHLIB_COMPAT(libc, GLOB_LSTAT_VERSION, GLIBC_2_27)
+
+#if XSTAT_IS_XSTAT64
 #define glob64 __no_glob64_decl
+#define __glob64 __no___glob64_decl
+#define __glob64_lstat_compat __no_glob64_lstat_compat_decl
+#endif
+
 #include <glob.h>
+
 #undef glob64
+#undef __glob64
+#undef __glob64_lstat_compat
 
 #define __glob __glob_lstat_compat
 
@@ -33,12 +47,7 @@
 #define GLOB_NO_LSTAT
 
 #include <posix/glob.c>
-
-#ifndef GLOB_LSTAT_VERSION
-# define GLOB_LSTAT_VERSION GLIBC_2_0
-#endif
-
-#if SHLIB_COMPAT(libc, GLOB_LSTAT_VERSION, GLIBC_2_27)
+libc_hidden_def (__glob_lstat_compat)
 compat_symbol (libc, __glob_lstat_compat, glob, GLOB_LSTAT_VERSION);
 # if XSTAT_IS_XSTAT64
 strong_alias (__glob_lstat_compat, __glob64_lstat_compat)
diff --git a/sysdeps/unix/sysv/linux/glob64-lstat-compat.c b/sysdeps/unix/sysv/linux/glob64-lstat-compat.c
index 4475e0091c..66334e7009 100644
--- a/sysdeps/unix/sysv/linux/glob64-lstat-compat.c
+++ b/sysdeps/unix/sysv/linux/glob64-lstat-compat.c
@@ -21,6 +21,8 @@
 #include <kernel_stat.h>
 
 #if !XSTAT_IS_XSTAT64
+# if SHLIB_COMPAT(libc, GLIBC_2_2, GLIBC_2_27)
+
 # include <glob.h>
 # include <dirent.h>
 # include <sys/stat.h>
@@ -45,12 +47,14 @@
 
 # include <posix/glob.c>
 
-# if SHLIB_COMPAT(libc, GLIBC_2_2, GLIBC_2_27)
+libc_hidden_def (__glob64_lstat_compat)
+
 #  ifndef GLOB_NO_OLD_VERSION
 #   define GLOB_LSTAT_START_VER GLIBC_2_2
 #  else
 #   define GLOB_LSTAT_START_VER GLIBC_2_1
 #  endif
 compat_symbol (libc, __glob64_lstat_compat, glob64, GLOB_LSTAT_START_VER);
-# endif
-#endif /* XSTAT_IS_XSTAT64  */
+
+# endif /* SHLIB_COMPAT */
+#endif /* XSTAT_IS_XSTAT64 */
diff --git a/sysdeps/unix/sysv/linux/ia64/syscalls.list b/sysdeps/unix/sysv/linux/ia64/syscalls.list
index 56f4138c43..bd39441d3c 100644
--- a/sysdeps/unix/sysv/linux/ia64/syscalls.list
+++ b/sysdeps/unix/sysv/linux/ia64/syscalls.list
@@ -1,7 +1,5 @@
 # File name	Caller	Syscall name	# args	Strong name	Weak names
 
-umount2		-	umount		2	__umount2	umount2
-
 getpriority	-	getpriority	i:ii	__getpriority	getpriority
 
 # proper socket implementations:
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/umount.c b/sysdeps/unix/sysv/linux/mips/mips64/umount.c
index 87997e029f..fcf3a51fc1 100644
--- a/sysdeps/unix/sysv/linux/mips/mips64/umount.c
+++ b/sysdeps/unix/sysv/linux/mips/mips64/umount.c
@@ -19,7 +19,7 @@
 /* Since we don't have an oldumount system call, do what the kernel
    does down here.  */
 
-extern long int __umount2 (const char *name, int flags);
+#include <mount-internal.h>
 
 long int
 __umount (const char *name)
diff --git a/sysdeps/unix/sysv/linux/umount2.S b/sysdeps/unix/sysv/linux/umount2.S
index 92241bbf97..2f14095a17 100644
--- a/sysdeps/unix/sysv/linux/umount2.S
+++ b/sysdeps/unix/sysv/linux/umount2.S
@@ -9,5 +9,6 @@ PSEUDO (__umount2, umount2, 2)
 #endif
 	ret
 PSEUDO_END(__umount2)
+libc_hidden_def (__umount2)
 weak_alias (__umount2, umount2)
 #endif
diff --git a/sysdeps/unix/sysv/linux/x86_64/compat-timer.h b/sysdeps/unix/sysv/linux/x86_64/compat-timer.h
index ba4f0b39da..21dc48de24 100644
--- a/sysdeps/unix/sysv/linux/x86_64/compat-timer.h
+++ b/sysdeps/unix/sysv/linux/x86_64/compat-timer.h
@@ -16,6 +16,9 @@
    License along with the GNU C Library; see the file COPYING.LIB.  If
    not, see <http://www.gnu.org/licenses/>.  */
 
+#ifndef _COMPAT_TIMER_H
+#define _COMPAT_TIMER_H 1
+
 #include <signal.h>
 #include <time.h>
 #include <sys/types.h>
@@ -27,12 +30,17 @@ extern timer_t __compat_timer_list[OLD_TIMER_MAX] attribute_hidden;
 
 extern int __timer_create_new (clockid_t clock_id, struct sigevent *evp,
 			       timer_t *timerid);
+librt_hidden_proto (__timer_create_new)
 extern int __timer_delete_new (timer_t timerid);
+librt_hidden_proto (__timer_delete_new)
 extern int __timer_getoverrun_new (timer_t timerid);
+librt_hidden_proto (__timer_getoverrun_new)
 extern int __timer_gettime_new (timer_t timerid, struct itimerspec *value);
+librt_hidden_proto (__timer_gettime_new)
 extern int __timer_settime_new (timer_t timerid, int flags,
 				const struct itimerspec *value,
 				struct itimerspec *ovalue);
+librt_hidden_proto (__timer_settime_new)
 
 
 extern int __timer_create_old (clockid_t clock_id, struct sigevent *evp,
@@ -43,3 +51,5 @@ extern int __timer_gettime_old (int timerid, struct itimerspec *value);
 extern int __timer_settime_old (int timerid, int flags,
 				const struct itimerspec *value,
 				struct itimerspec *ovalue);
+
+#endif
diff --git a/sysdeps/unix/sysv/linux/x86_64/timer_create.c b/sysdeps/unix/sysv/linux/x86_64/timer_create.c
index b96b2b49d3..2676b22fe7 100644
--- a/sysdeps/unix/sysv/linux/x86_64/timer_create.c
+++ b/sysdeps/unix/sysv/linux/x86_64/timer_create.c
@@ -25,6 +25,7 @@
 #include <sysdeps/unix/sysv/linux/timer_create.c>
 
 #undef timer_create
+librt_hidden_def (__timer_create_new)
 versioned_symbol (librt, __timer_create_new, timer_create, GLIBC_2_3_3);
 
 
diff --git a/sysdeps/unix/sysv/linux/x86_64/timer_delete.c b/sysdeps/unix/sysv/linux/x86_64/timer_delete.c
index f0fc3a4a78..1c291ff22f 100644
--- a/sysdeps/unix/sysv/linux/x86_64/timer_delete.c
+++ b/sysdeps/unix/sysv/linux/x86_64/timer_delete.c
@@ -24,6 +24,7 @@
 #include <sysdeps/unix/sysv/linux/timer_delete.c>
 
 #undef timer_delete
+librt_hidden_def (__timer_delete_new)
 versioned_symbol (librt, __timer_delete_new, timer_delete, GLIBC_2_3_3);
 
 
diff --git a/sysdeps/unix/sysv/linux/x86_64/timer_getoverr.c b/sysdeps/unix/sysv/linux/x86_64/timer_getoverr.c
index b027f56df3..46b8f6eb35 100644
--- a/sysdeps/unix/sysv/linux/x86_64/timer_getoverr.c
+++ b/sysdeps/unix/sysv/linux/x86_64/timer_getoverr.c
@@ -24,6 +24,7 @@
 #include <sysdeps/unix/sysv/linux/timer_getoverr.c>
 
 #undef timer_getoverrun
+librt_hidden_def (__timer_getoverrun_new)
 versioned_symbol (librt, __timer_getoverrun_new, timer_getoverrun,
 		  GLIBC_2_3_3);
 
diff --git a/sysdeps/unix/sysv/linux/x86_64/timer_gettime.c b/sysdeps/unix/sysv/linux/x86_64/timer_gettime.c
index 7730bc9447..7e8ec053e9 100644
--- a/sysdeps/unix/sysv/linux/x86_64/timer_gettime.c
+++ b/sysdeps/unix/sysv/linux/x86_64/timer_gettime.c
@@ -24,6 +24,7 @@
 #include <sysdeps/unix/sysv/linux/timer_gettime.c>
 
 #undef timer_gettime
+librt_hidden_def (__timer_gettime_new)
 versioned_symbol (librt, __timer_gettime_new, timer_gettime, GLIBC_2_3_3);
 
 
diff --git a/sysdeps/unix/sysv/linux/x86_64/timer_settime.c b/sysdeps/unix/sysv/linux/x86_64/timer_settime.c
index 26178a8020..489580e318 100644
--- a/sysdeps/unix/sysv/linux/x86_64/timer_settime.c
+++ b/sysdeps/unix/sysv/linux/x86_64/timer_settime.c
@@ -24,6 +24,7 @@
 #include <sysdeps/unix/sysv/linux/timer_settime.c>
 
 #undef timer_settime
+librt_hidden_def (__timer_settime_new)
 versioned_symbol (librt, __timer_settime_new, timer_settime, GLIBC_2_3_3);
 
 
diff --git a/sysdeps/unix/sysv/linux/x86_64/umount.c b/sysdeps/unix/sysv/linux/x86_64/umount.c
index 9030774776..235fe1c105 100644
--- a/sysdeps/unix/sysv/linux/x86_64/umount.c
+++ b/sysdeps/unix/sysv/linux/x86_64/umount.c
@@ -19,9 +19,9 @@
 /* Since we don't have an oldumount system call, do what the kernel
    does down here.  */
 
-extern long int __umount2 (const char *name, int flags);
+#include <mount-internal.h>
 
-long int
+int
 __umount (const char *name)
 {
   return __umount2 (name, 0);
diff --git a/sysdeps/unix/sysv/mount-internal.h b/sysdeps/unix/sysv/mount-internal.h
new file mode 100644
index 0000000000..7f8e42a337
--- /dev/null
+++ b/sysdeps/unix/sysv/mount-internal.h
@@ -0,0 +1,26 @@
+/* Copyright (C) 2011-2018 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library.  If not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#ifndef _MOUNT_INTERNAL_H
+#define _MOUNT_INTERNAL_H 1
+
+#include <sys/mount.h>
+
+extern typeof (umount2) __umount2;
+libc_hidden_proto (__umount2);
+
+#endif
diff --git a/sysdeps/x86/fpu/include/bits/fenv.h b/sysdeps/x86/fpu/include/bits/fenv.h
index 3d2483b0bf..355e592f0f 100644
--- a/sysdeps/x86/fpu/include/bits/fenv.h
+++ b/sysdeps/x86/fpu/include/bits/fenv.h
@@ -18,9 +18,12 @@
 
 #ifndef _BITS_FENV_H
 
-#if defined _LIBC && defined __USE_EXTERN_INLINES
+/* The installed version of bits/fenv.h only declares
+   __feraiseexcept_renamed when _LIBC is not defined.  */
+#if defined __USE_EXTERN_INLINES && defined _LIBC
 # if defined SHARED && !defined NO_HIDDEN && IS_IN (libm)
-extern int __REDIRECT_NTH (__feraiseexcept_renamed, (int), __GI_feraiseexcept);
+extern int __REDIRECT_NTH (__feraiseexcept_renamed, (int),
+                           __GI_feraiseexcept) attribute_hidden;
 # else
 extern int __REDIRECT_NTH (__feraiseexcept_renamed, (int), feraiseexcept);
 # endif
@@ -28,15 +31,13 @@ extern int __REDIRECT_NTH (__feraiseexcept_renamed, (int), feraiseexcept);
 
 #include_next <bits/fenv.h>
 
-# ifndef _ISOMAC
+#if defined __USE_EXTERN_INLINES && !defined _ISOMAC
 
 /* Ensure __feraiseexcept calls in glibc are optimized the same as
    feraiseexcept calls.  */
 
-#ifdef __USE_EXTERN_INLINES
 __BEGIN_DECLS
 
-extern int __REDIRECT_NTH (____feraiseexcept_renamed, (int), __feraiseexcept);
 __extern_inline int
 __NTH (__feraiseexcept (int __excepts))
 {
@@ -47,11 +48,10 @@ __NTH (__feraiseexcept (int __excepts))
       return 0;
     }
 
-  return ____feraiseexcept_renamed (__excepts);
+  return __feraiseexcept_renamed (__excepts);
 }
 
 __END_DECLS
-#endif
 
-# endif /* _ISOMAC */
+#endif /* __USE_EXTERN_INLINES && !_ISOMAC */
 #endif /* bits/fenv.h */
diff --git a/sysdeps/x86_64/fpu/multiarch/e_log-avx.c b/sysdeps/x86_64/fpu/multiarch/e_log-avx.c
index b22a5767be..bbd019b528 100644
--- a/sysdeps/x86_64/fpu/multiarch/e_log-avx.c
+++ b/sysdeps/x86_64/fpu/multiarch/e_log-avx.c
@@ -1,3 +1,5 @@
+#include <math.h>
+
 #define __ieee754_log __ieee754_log_avx
 #define SECTION __attribute__ ((section (".text.avx")))
 
diff --git a/sysdeps/x86_64/fpu/multiarch/e_log-fma.c b/sysdeps/x86_64/fpu/multiarch/e_log-fma.c
index bce0ee03c2..4e9fbb8990 100644
--- a/sysdeps/x86_64/fpu/multiarch/e_log-fma.c
+++ b/sysdeps/x86_64/fpu/multiarch/e_log-fma.c
@@ -1,3 +1,5 @@
+#include <math.h>
+
 #define __ieee754_log __ieee754_log_fma
 #define SECTION __attribute__ ((section (".text.fma")))
 
diff --git a/sysdeps/x86_64/fpu/multiarch/e_log-fma4.c b/sysdeps/x86_64/fpu/multiarch/e_log-fma4.c
index f458f9c23c..18fb2403a0 100644
--- a/sysdeps/x86_64/fpu/multiarch/e_log-fma4.c
+++ b/sysdeps/x86_64/fpu/multiarch/e_log-fma4.c
@@ -1,3 +1,5 @@
+#include <math.h>
+
 #define __ieee754_log __ieee754_log_fma4
 #define SECTION __attribute__ ((section (".text.fma4")))
 
diff --git a/sysdeps/x86_64/fpu/multiarch/e_logf-fma.c b/sysdeps/x86_64/fpu/multiarch/e_logf-fma.c
index a47fd8195f..445c0e851e 100644
--- a/sysdeps/x86_64/fpu/multiarch/e_logf-fma.c
+++ b/sysdeps/x86_64/fpu/multiarch/e_logf-fma.c
@@ -1,3 +1,5 @@
+#include <math.h>
+
 #define __logf __logf_fma
 
 #include <sysdeps/ieee754/flt-32/e_logf.c>
diff --git a/sysdeps/x86_64/fpu/multiarch/e_powf.c b/sysdeps/x86_64/fpu/multiarch/e_powf.c
index a185006f40..4caad1a50d 100644
--- a/sysdeps/x86_64/fpu/multiarch/e_powf.c
+++ b/sysdeps/x86_64/fpu/multiarch/e_powf.c
@@ -16,12 +16,10 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
+#include <math.h>
 #include <libm-alias-float.h>
 
-#define powf __redirect_powf
-#define __DECL_SIMD___redirect_powf
-#include <math.h>
-#undef powf
+extern typeof (__powf) __redirect_powf;
 
 #define SYMBOL_NAME powf
 #include "ifunc-fma.h"
diff --git a/sysdeps/x86_64/fpu/multiarch/s_atan-avx.c b/sysdeps/x86_64/fpu/multiarch/s_atan-avx.c
index 41816bfe6c..b8a4e0877a 100644
--- a/sysdeps/x86_64/fpu/multiarch/s_atan-avx.c
+++ b/sysdeps/x86_64/fpu/multiarch/s_atan-avx.c
@@ -1,3 +1,5 @@
+#include <math.h>
+
 #define __atan __atan_avx
 #define __add __add_avx
 #define __dbl_mp __dbl_mp_avx
diff --git a/sysdeps/x86_64/fpu/multiarch/s_atan-fma.c b/sysdeps/x86_64/fpu/multiarch/s_atan-fma.c
index 363e32bcbd..63d2728bed 100644
--- a/sysdeps/x86_64/fpu/multiarch/s_atan-fma.c
+++ b/sysdeps/x86_64/fpu/multiarch/s_atan-fma.c
@@ -1,3 +1,5 @@
+#include <math.h>
+
 #define __atan __atan_fma
 #define __add __add_fma
 #define __dbl_mp __dbl_mp_fma
diff --git a/sysdeps/x86_64/fpu/multiarch/s_atan-fma4.c b/sysdeps/x86_64/fpu/multiarch/s_atan-fma4.c
index ad8d3af579..ebf49e3333 100644
--- a/sysdeps/x86_64/fpu/multiarch/s_atan-fma4.c
+++ b/sysdeps/x86_64/fpu/multiarch/s_atan-fma4.c
@@ -1,3 +1,5 @@
+#include <math.h>
+
 #define __atan __atan_fma4
 #define __add __add_fma4
 #define __dbl_mp __dbl_mp_fma4
diff --git a/sysdeps/x86_64/fpu/multiarch/s_atan.c b/sysdeps/x86_64/fpu/multiarch/s_atan.c
index f9ce8549ab..20a95da859 100644
--- a/sysdeps/x86_64/fpu/multiarch/s_atan.c
+++ b/sysdeps/x86_64/fpu/multiarch/s_atan.c
@@ -16,6 +16,7 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
+#include <math.h>
 #include <libm-alias-double.h>
 
 extern double __redirect_atan (double);
@@ -24,6 +25,7 @@ extern double __redirect_atan (double);
 #include "ifunc-avx-fma4.h"
 
 libc_ifunc_redirected (__redirect_atan, __atan, IFUNC_SELECTOR ());
+libm_hidden_def (__atan)
 libm_alias_double (__atan, atan)
 
 #define __atan __atan_sse2
diff --git a/sysdeps/x86_64/fpu/multiarch/s_ceil-c.c b/sysdeps/x86_64/fpu/multiarch/s_ceil-c.c
index 6a5ea3ff27..094f946d41 100644
--- a/sysdeps/x86_64/fpu/multiarch/s_ceil-c.c
+++ b/sysdeps/x86_64/fpu/multiarch/s_ceil-c.c
@@ -1,2 +1,3 @@
+#include <math.h>
 #define __ceil __ceil_c
 #include <sysdeps/ieee754/dbl-64/wordsize-64/s_ceil.c>
diff --git a/sysdeps/x86_64/fpu/multiarch/s_ceil.c b/sysdeps/x86_64/fpu/multiarch/s_ceil.c
index 070fcdddea..99bf8cc301 100644
--- a/sysdeps/x86_64/fpu/multiarch/s_ceil.c
+++ b/sysdeps/x86_64/fpu/multiarch/s_ceil.c
@@ -16,16 +16,14 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
+#include <math.h>
 #include <libm-alias-double.h>
 
-#define ceil __redirect_ceil
-#define __ceil __redirect___ceil
-#include <math.h>
-#undef ceil
-#undef __ceil
+extern typeof (__ceil) __redirect_ceil;
 
 #define SYMBOL_NAME ceil
 #include "ifunc-sse4_1.h"
 
 libc_ifunc_redirected (__redirect_ceil, __ceil, IFUNC_SELECTOR ());
+libm_hidden_def (__ceil)
 libm_alias_double (__ceil, ceil)
diff --git a/sysdeps/x86_64/fpu/multiarch/s_ceilf.c b/sysdeps/x86_64/fpu/multiarch/s_ceilf.c
index db0c6c4bc3..b35af7bf0b 100644
--- a/sysdeps/x86_64/fpu/multiarch/s_ceilf.c
+++ b/sysdeps/x86_64/fpu/multiarch/s_ceilf.c
@@ -17,15 +17,13 @@
    <http://www.gnu.org/licenses/>.  */
 
 #include <libm-alias-float.h>
-
-#define ceilf __redirect_ceilf
-#define __ceilf __redirect___ceilf
 #include <math.h>
-#undef ceilf
-#undef __ceilf
+
+extern typeof (__ceilf) __redirect_ceilf;
 
 #define SYMBOL_NAME ceilf
 #include "ifunc-sse4_1.h"
 
 libc_ifunc_redirected (__redirect_ceilf, __ceilf, IFUNC_SELECTOR ());
+libm_hidden_def (__ceilf)
 libm_alias_float (__ceil, ceil)
diff --git a/sysdeps/x86_64/fpu/multiarch/s_cosf.c b/sysdeps/x86_64/fpu/multiarch/s_cosf.c
index 33959d3d01..ef93242b75 100644
--- a/sysdeps/x86_64/fpu/multiarch/s_cosf.c
+++ b/sysdeps/x86_64/fpu/multiarch/s_cosf.c
@@ -16,13 +16,14 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
+#include <math.h>
 #include <libm-alias-float.h>
 
-extern float __redirect_cosf (float);
+extern typeof (__cosf) __redirect_cosf;
 
 #define SYMBOL_NAME cosf
 #include "ifunc-fma.h"
 
 libc_ifunc_redirected (__redirect_cosf, __cosf, IFUNC_SELECTOR ());
-
+libm_hidden_def (__cosf)
 libm_alias_float (__cos, cos)
diff --git a/sysdeps/x86_64/fpu/multiarch/s_floor-c.c b/sysdeps/x86_64/fpu/multiarch/s_floor-c.c
index 68733b69ef..8a1b5eb7a2 100644
--- a/sysdeps/x86_64/fpu/multiarch/s_floor-c.c
+++ b/sysdeps/x86_64/fpu/multiarch/s_floor-c.c
@@ -1,3 +1,4 @@
+#include <math.h>
 #undef __floor
 #define __floor __floor_c
 #include <sysdeps/ieee754/dbl-64/wordsize-64/s_floor.c>
diff --git a/sysdeps/x86_64/fpu/multiarch/s_floor.c b/sysdeps/x86_64/fpu/multiarch/s_floor.c
index 58f8ed8eaf..cbcab2d419 100644
--- a/sysdeps/x86_64/fpu/multiarch/s_floor.c
+++ b/sysdeps/x86_64/fpu/multiarch/s_floor.c
@@ -16,16 +16,14 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
+#include <math.h>
 #include <libm-alias-double.h>
 
-#define floor __redirect_floor
-#define __floor __redirect___floor
-#include <math.h>
-#undef floor
-#undef __floor
+extern typeof (__floor) __redirect_floor;
 
 #define SYMBOL_NAME floor
 #include "ifunc-sse4_1.h"
 
 libc_ifunc_redirected (__redirect_floor, __floor, IFUNC_SELECTOR ());
+libm_hidden_def (__floor)
 libm_alias_double (__floor, floor)
diff --git a/sysdeps/x86_64/fpu/multiarch/s_floorf.c b/sysdeps/x86_64/fpu/multiarch/s_floorf.c
index 5ef2fec2e3..c73a3c0fc6 100644
--- a/sysdeps/x86_64/fpu/multiarch/s_floorf.c
+++ b/sysdeps/x86_64/fpu/multiarch/s_floorf.c
@@ -16,16 +16,14 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
+#include <math.h>
 #include <libm-alias-float.h>
 
-#define floorf __redirect_floorf
-#define __floorf __redirect___floorf
-#include <math.h>
-#undef floorf
-#undef __floorf
+extern typeof (__floorf) __redirect_floorf;
 
 #define SYMBOL_NAME floorf
 #include "ifunc-sse4_1.h"
 
 libc_ifunc_redirected (__redirect_floorf, __floorf, IFUNC_SELECTOR ());
+libm_hidden_def (__floorf)
 libm_alias_float (__floor, floor)
diff --git a/sysdeps/x86_64/fpu/multiarch/s_nearbyint-c.c b/sysdeps/x86_64/fpu/multiarch/s_nearbyint-c.c
index f897a2a6a6..35b36ef102 100644
--- a/sysdeps/x86_64/fpu/multiarch/s_nearbyint-c.c
+++ b/sysdeps/x86_64/fpu/multiarch/s_nearbyint-c.c
@@ -1,3 +1,8 @@
+#include <math.h>
+
+extern typeof (__nearbyint) __nearbyint_c;
+libm_hidden_proto (__nearbyint_c)
+
 #undef __nearbyint
 #define __nearbyint __nearbyint_c
 #include <sysdeps/ieee754/dbl-64/wordsize-64/s_nearbyint.c>
diff --git a/sysdeps/x86_64/fpu/multiarch/s_nearbyint.c b/sysdeps/x86_64/fpu/multiarch/s_nearbyint.c
index d92945fd14..d55bd0ec29 100644
--- a/sysdeps/x86_64/fpu/multiarch/s_nearbyint.c
+++ b/sysdeps/x86_64/fpu/multiarch/s_nearbyint.c
@@ -16,17 +16,15 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
+#include <math.h>
 #include <libm-alias-double.h>
 
-#define nearbyint __redirect_nearbyint
-#define __nearbyint __redirect___nearbyint
-#include <math.h>
-#undef nearbyint
-#undef __nearbyint
+extern typeof (__nearbyint) __redirect_nearbyint;
 
 #define SYMBOL_NAME nearbyint
 #include "ifunc-sse4_1.h"
 
 libc_ifunc_redirected (__redirect_nearbyint, __nearbyint,
 		       IFUNC_SELECTOR ());
+libm_hidden_def (__nearbyint)
 libm_alias_double (__nearbyint, nearbyint)
diff --git a/sysdeps/x86_64/fpu/multiarch/s_nearbyintf.c b/sysdeps/x86_64/fpu/multiarch/s_nearbyintf.c
index ba7be27956..1524633ac2 100644
--- a/sysdeps/x86_64/fpu/multiarch/s_nearbyintf.c
+++ b/sysdeps/x86_64/fpu/multiarch/s_nearbyintf.c
@@ -16,17 +16,15 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
+#include <math.h>
 #include <libm-alias-float.h>
 
-#define nearbyintf __redirect_nearbyintf
-#define __nearbyintf __redirect___nearbyintf
-#include <math.h>
-#undef nearbyintf
-#undef __nearbyintf
+extern typeof (__nearbyintf) __redirect_nearbyintf;
 
 #define SYMBOL_NAME nearbyintf
 #include "ifunc-sse4_1.h"
 
 libc_ifunc_redirected (__redirect_nearbyintf, __nearbyintf,
 		       IFUNC_SELECTOR ());
+libm_hidden_def (__nearbyintf)
 libm_alias_float (__nearbyint, nearbyint)
diff --git a/sysdeps/x86_64/fpu/multiarch/s_rint-c.c b/sysdeps/x86_64/fpu/multiarch/s_rint-c.c
index 162a630ff9..7a0757ae7a 100644
--- a/sysdeps/x86_64/fpu/multiarch/s_rint-c.c
+++ b/sysdeps/x86_64/fpu/multiarch/s_rint-c.c
@@ -1,3 +1,4 @@
+#include <math.h>
 #undef __rint
 #define __rint __rint_c
 #include <sysdeps/ieee754/dbl-64/wordsize-64/s_rint.c>
diff --git a/sysdeps/x86_64/fpu/multiarch/s_rint.c b/sysdeps/x86_64/fpu/multiarch/s_rint.c
index f1cb2fed0c..2e96907aff 100644
--- a/sysdeps/x86_64/fpu/multiarch/s_rint.c
+++ b/sysdeps/x86_64/fpu/multiarch/s_rint.c
@@ -16,16 +16,14 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
+#include <math.h>
 #include <libm-alias-double.h>
 
-#define rint __redirect_rint
-#define __rint __redirect___rint
-#include <math.h>
-#undef rint
-#undef __rint
+extern typeof (__rint) __redirect_rint;
 
 #define SYMBOL_NAME rint
 #include "ifunc-sse4_1.h"
 
 libc_ifunc_redirected (__redirect_rint, __rint, IFUNC_SELECTOR ());
+libm_hidden_def (__rint)
 libm_alias_double (__rint, rint)
diff --git a/sysdeps/x86_64/fpu/multiarch/s_rintf.c b/sysdeps/x86_64/fpu/multiarch/s_rintf.c
index 41323b3b5b..011c7effa0 100644
--- a/sysdeps/x86_64/fpu/multiarch/s_rintf.c
+++ b/sysdeps/x86_64/fpu/multiarch/s_rintf.c
@@ -16,16 +16,14 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
+#include <math.h>
 #include <libm-alias-float.h>
 
-#define rintf __redirect_rintf
-#define __rintf __redirect___rintf
-#include <math.h>
-#undef rintf
-#undef __rintf
+extern typeof (__rintf) __redirect_rintf;
 
 #define SYMBOL_NAME rintf
 #include "ifunc-sse4_1.h"
 
 libc_ifunc_redirected (__redirect_rintf, __rintf, IFUNC_SELECTOR ());
+libm_hidden_def (__rintf)
 libm_alias_float (__rint, rint)
diff --git a/sysdeps/x86_64/fpu/multiarch/s_sin-avx.c b/sysdeps/x86_64/fpu/multiarch/s_sin-avx.c
index e1c6de0259..1ad90c0878 100644
--- a/sysdeps/x86_64/fpu/multiarch/s_sin-avx.c
+++ b/sysdeps/x86_64/fpu/multiarch/s_sin-avx.c
@@ -1,3 +1,5 @@
+#include <math.h>
+
 #define __cos __cos_avx
 #define __sin __sin_avx
 #define SECTION __attribute__ ((section (".text.avx")))
diff --git a/sysdeps/x86_64/fpu/multiarch/s_sin-fma.c b/sysdeps/x86_64/fpu/multiarch/s_sin-fma.c
index 15f3c394d5..5768f95ac0 100644
--- a/sysdeps/x86_64/fpu/multiarch/s_sin-fma.c
+++ b/sysdeps/x86_64/fpu/multiarch/s_sin-fma.c
@@ -1,3 +1,5 @@
+#include <math.h>
+
 #define __cos __cos_fma
 #define __sin __sin_fma
 #define __docos __docos_fma
diff --git a/sysdeps/x86_64/fpu/multiarch/s_sin-fma4.c b/sysdeps/x86_64/fpu/multiarch/s_sin-fma4.c
index 4c35739dc9..dc131ef11d 100644
--- a/sysdeps/x86_64/fpu/multiarch/s_sin-fma4.c
+++ b/sysdeps/x86_64/fpu/multiarch/s_sin-fma4.c
@@ -1,3 +1,5 @@
+#include <math.h>
+
 #define __cos __cos_fma4
 #define __sin __sin_fma4
 #define __docos __docos_fma4
diff --git a/sysdeps/x86_64/fpu/multiarch/s_sin.c b/sysdeps/x86_64/fpu/multiarch/s_sin.c
index b289269240..09209b209a 100644
--- a/sysdeps/x86_64/fpu/multiarch/s_sin.c
+++ b/sysdeps/x86_64/fpu/multiarch/s_sin.c
@@ -16,6 +16,7 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
+#include <math.h>
 #include <libm-alias-double.h>
 
 extern double __redirect_sin (double);
@@ -25,6 +26,7 @@ extern double __redirect_cos (double);
 #include "ifunc-avx-fma4.h"
 
 libc_ifunc_redirected (__redirect_sin, __sin, IFUNC_SELECTOR ());
+libm_hidden_def (__sin)
 libm_alias_double (__sin, sin)
 
 #undef SYMBOL_NAME
@@ -32,6 +34,7 @@ libm_alias_double (__sin, sin)
 #include "ifunc-avx-fma4.h"
 
 libc_ifunc_redirected (__redirect_cos, __cos, IFUNC_SELECTOR ());
+libm_hidden_def (__cos)
 libm_alias_double (__cos, cos)
 
 #define __cos __cos_sse2
diff --git a/sysdeps/x86_64/fpu/multiarch/s_sincosf.c b/sysdeps/x86_64/fpu/multiarch/s_sincosf.c
index 6cb4295558..ab4b1503f7 100644
--- a/sysdeps/x86_64/fpu/multiarch/s_sincosf.c
+++ b/sysdeps/x86_64/fpu/multiarch/s_sincosf.c
@@ -16,13 +16,14 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
+#include <math.h>
 #include <libm-alias-float.h>
 
-extern void __redirect_sincosf (float, float *, float *);
+extern typeof (__sincosf) __redirect_sincosf;
 
 #define SYMBOL_NAME sincosf
 #include "ifunc-fma.h"
 
 libc_ifunc_redirected (__redirect_sincosf, __sincosf, IFUNC_SELECTOR ());
-
+libm_hidden_def (__sincosf)
 libm_alias_float (__sincos, sincos)
diff --git a/sysdeps/x86_64/fpu/multiarch/s_sinf.c b/sysdeps/x86_64/fpu/multiarch/s_sinf.c
index 4fdfbd8d3e..705a6a68f4 100644
--- a/sysdeps/x86_64/fpu/multiarch/s_sinf.c
+++ b/sysdeps/x86_64/fpu/multiarch/s_sinf.c
@@ -16,13 +16,14 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
+#include <math.h>
 #include <libm-alias-float.h>
 
-extern float __redirect_sinf (float);
+extern typeof (__sinf) __redirect_sinf;
 
 #define SYMBOL_NAME sinf
 #include "ifunc-fma.h"
 
 libc_ifunc_redirected (__redirect_sinf, __sinf, IFUNC_SELECTOR ());
-
+libm_hidden_def (__sinf)
 libm_alias_float (__sin, sin)
diff --git a/sysdeps/x86_64/fpu/multiarch/s_trunc-c.c b/sysdeps/x86_64/fpu/multiarch/s_trunc-c.c
index 6204ae3c77..e28a328df7 100644
--- a/sysdeps/x86_64/fpu/multiarch/s_trunc-c.c
+++ b/sysdeps/x86_64/fpu/multiarch/s_trunc-c.c
@@ -1,2 +1,3 @@
+#include <math.h>
 #define __trunc __trunc_c
 #include <sysdeps/ieee754/dbl-64/wordsize-64/s_trunc.c>
diff --git a/sysdeps/x86_64/fpu/multiarch/s_trunc.c b/sysdeps/x86_64/fpu/multiarch/s_trunc.c
index a1b0c60630..7cb576a1a4 100644
--- a/sysdeps/x86_64/fpu/multiarch/s_trunc.c
+++ b/sysdeps/x86_64/fpu/multiarch/s_trunc.c
@@ -16,16 +16,14 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
+#include <math.h>
 #include <libm-alias-double.h>
 
-#define trunc __redirect_trunc
-#define __trunc __redirect___trunc
-#include <math.h>
-#undef trunc
-#undef __trunc
+extern typeof (__trunc) __redirect_trunc;
 
 #define SYMBOL_NAME trunc
 #include "ifunc-sse4_1.h"
 
 libc_ifunc_redirected (__redirect_trunc, __trunc, IFUNC_SELECTOR ());
+libm_hidden_def (__trunc)
 libm_alias_double (__trunc, trunc)
diff --git a/sysdeps/x86_64/fpu/multiarch/s_truncf.c b/sysdeps/x86_64/fpu/multiarch/s_truncf.c
index a7e220bd0c..0bd7e6ce06 100644
--- a/sysdeps/x86_64/fpu/multiarch/s_truncf.c
+++ b/sysdeps/x86_64/fpu/multiarch/s_truncf.c
@@ -16,16 +16,14 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
+#include <math.h>
 #include <libm-alias-float.h>
 
-#define truncf __redirect_truncf
-#define __truncf __redirect___truncf
-#include <math.h>
-#undef truncf
-#undef __truncf
+extern typeof (__truncf) __redirect_truncf;
 
 #define SYMBOL_NAME truncf
 #include "ifunc-sse4_1.h"
 
 libc_ifunc_redirected (__redirect_truncf, __truncf, IFUNC_SELECTOR ());
+libm_hidden_def (__truncf)
 libm_alias_float (__trunc, trunc)
diff --git a/sysdeps/x86_64/fpu/s_ceill.S b/sysdeps/x86_64/fpu/s_ceill.S
index 8f2bd351f6..981190ea4c 100644
--- a/sysdeps/x86_64/fpu/s_ceill.S
+++ b/sysdeps/x86_64/fpu/s_ceill.S
@@ -34,4 +34,5 @@ ENTRY(__ceill)
 
 	ret
 END (__ceill)
+libm_hidden_def (__ceill)
 libm_alias_ldouble (__ceil, ceil)
diff --git a/sysdeps/x86_64/fpu/s_floorl.S b/sysdeps/x86_64/fpu/s_floorl.S
index 75f8255648..6fd367dd82 100644
--- a/sysdeps/x86_64/fpu/s_floorl.S
+++ b/sysdeps/x86_64/fpu/s_floorl.S
@@ -33,4 +33,5 @@ ENTRY(__floorl)
 
 	ret
 END (__floorl)
+libm_hidden_def (__floorl)
 libm_alias_ldouble (__floor, floor)
diff --git a/sysdeps/x86_64/fpu/s_log1pl.S b/sysdeps/x86_64/fpu/s_log1pl.S
index 947e5e4552..e263afb02d 100644
--- a/sysdeps/x86_64/fpu/s_log1pl.S
+++ b/sysdeps/x86_64/fpu/s_log1pl.S
@@ -72,3 +72,4 @@ ENTRY(__log1pl)
 	ret
 
 END (__log1pl)
+libm_hidden_def (__log1pl)
diff --git a/sysdeps/x86_64/fpu/s_scalbnl.S b/sysdeps/x86_64/fpu/s_scalbnl.S
index 6c7683c32b..fb40ce54dd 100644
--- a/sysdeps/x86_64/fpu/s_scalbnl.S
+++ b/sysdeps/x86_64/fpu/s_scalbnl.S
@@ -15,3 +15,6 @@ ENTRY(__scalbnl)
 	fstp	%st(1)
 	ret
 END (__scalbnl)
+#if IS_IN (libc) || IS_IN (libm)
+hidden_def (__scalbnl)
+#endif
diff --git a/sysdeps/x86_64/fpu/s_sincosf.S b/sysdeps/x86_64/fpu/s_sincosf.S
index 2086e8ca5c..6a6ecb7177 100644
--- a/sysdeps/x86_64/fpu/s_sincosf.S
+++ b/sysdeps/x86_64/fpu/s_sincosf.S
@@ -562,5 +562,6 @@ L(SP_ONE):
 	ASM_SIZE_DIRECTIVE(L(SP_ONE))
 
 #ifndef __sincosf
+libm_hidden_def (__sincosf)
 libm_alias_float (__sincos, sincos)
 #endif
diff --git a/sysdeps/x86_64/fpu/s_truncl.S b/sysdeps/x86_64/fpu/s_truncl.S
index 22427ece00..89c036318d 100644
--- a/sysdeps/x86_64/fpu/s_truncl.S
+++ b/sysdeps/x86_64/fpu/s_truncl.S
@@ -34,4 +34,5 @@ ENTRY(__truncl)
 	fldenv	-28(%rsp)
 	ret
 END(__truncl)
+libm_hidden_def (__truncl)
 libm_alias_ldouble (__trunc, trunc)
diff --git a/sysdeps/x86_64/memrchr.S b/sysdeps/x86_64/memrchr.S
index b8e3fa1d87..bde2e4f7ab 100644
--- a/sysdeps/x86_64/memrchr.S
+++ b/sysdeps/x86_64/memrchr.S
@@ -377,4 +377,5 @@ L(length_less16_part2_return):
 	ret
 
 END (__memrchr)
+libc_hidden_def (__memrchr)
 weak_alias (__memrchr, memrchr)
diff --git a/sysdeps/x86_64/multiarch/memrchr.c b/sysdeps/x86_64/multiarch/memrchr.c
index d227fe7819..82d585218f 100644
--- a/sysdeps/x86_64/multiarch/memrchr.c
+++ b/sysdeps/x86_64/multiarch/memrchr.c
@@ -17,15 +17,17 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
+# include <string.h>
+
 /* Define multiple versions only for the definition in libc.  */
 #if IS_IN (libc)
-# define memrchr __redirect_memrchr
-# include <string.h>
-# undef memrchr
+
+extern typeof (__memrchr) __redirect_memrchr;
 
 # define SYMBOL_NAME memrchr
 # include "ifunc-avx2.h"
 
 libc_ifunc_redirected (__redirect_memrchr, __memrchr, IFUNC_SELECTOR ());
+libc_hidden_def (__memrchr)
 weak_alias (__memrchr, memrchr)
 #endif
diff --git a/sysdeps/x86_64/multiarch/strchrnul.c b/sysdeps/x86_64/multiarch/strchrnul.c
index 7514999341..a2c4155c64 100644
--- a/sysdeps/x86_64/multiarch/strchrnul.c
+++ b/sysdeps/x86_64/multiarch/strchrnul.c
@@ -17,18 +17,18 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
+#include <string.h>
+
 /* Define multiple versions only for the definition in libc.  */
 #if IS_IN (libc)
-# define strchrnul __redirect_strchrnul
-# define __strchrnul __redirect___strchrnul
-# include <string.h>
-# undef __strchrnul
-# undef strchrnul
+
+extern typeof (__strchrnul) __redirect_strchrnul;
 
 # define SYMBOL_NAME strchrnul
 # include "ifunc-avx2.h"
 
 libc_ifunc_redirected (__redirect_strchrnul, __strchrnul,
 		       IFUNC_SELECTOR ());
+libc_hidden_def (__strchrnul)
 weak_alias (__strchrnul, strchrnul)
 #endif
diff --git a/sysdeps/x86_64/multiarch/strncase.c b/sysdeps/x86_64/multiarch/strncase.c
index 798966cf3e..fb31961267 100644
--- a/sysdeps/x86_64/multiarch/strncase.c
+++ b/sysdeps/x86_64/multiarch/strncase.c
@@ -17,19 +17,19 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
+#include <string.h>
+
 /* Define multiple versions only for the definition in libc.  */
 #if IS_IN (libc)
-# define strncasecmp __redirect_strncasecmp
-# define __strncasecmp __redirect___strncasecmp
-# include <string.h>
-# undef strncasecmp
-# undef __strncasecmp
+
+extern typeof (__strncasecmp) __redirect_strncasecmp;
 
 # define SYMBOL_NAME strncasecmp
 # include "ifunc-strcasecmp.h"
 
 libc_ifunc_redirected (__redirect_strncasecmp, __strncasecmp,
 		       IFUNC_SELECTOR ());
-
+libc_hidden_def (__strncasecmp)
 weak_alias (__strncasecmp, strncasecmp)
+
 #endif
diff --git a/sysdeps/x86_64/multiarch/wcslen.c b/sysdeps/x86_64/multiarch/wcslen.c
index 6d06e47cbd..cdf9aecf0f 100644
--- a/sysdeps/x86_64/multiarch/wcslen.c
+++ b/sysdeps/x86_64/multiarch/wcslen.c
@@ -18,14 +18,17 @@
    <http://www.gnu.org/licenses/>.  */
 
 /* Define multiple versions only for the definition in libc.  */
+
+#include <wchar.h>
+
 #if IS_IN (libc)
-# define __wcslen __redirect_wcslen
-# include <wchar.h>
-# undef __wcslen
+
+extern typeof (__wcslen) __redirect_wcslen;
 
 # define SYMBOL_NAME wcslen
 # include "ifunc-avx2.h"
 
 libc_ifunc_redirected (__redirect_wcslen, __wcslen, IFUNC_SELECTOR ());
-weak_alias (__wcslen, wcslen);
+libc_hidden_def (__wcslen)
+weak_alias (__wcslen, wcslen)
 #endif
diff --git a/sysdeps/x86_64/multiarch/wcsnlen.c b/sysdeps/x86_64/multiarch/wcsnlen.c
index bd376057e3..efe16e3c74 100644
--- a/sysdeps/x86_64/multiarch/wcsnlen.c
+++ b/sysdeps/x86_64/multiarch/wcsnlen.c
@@ -18,10 +18,11 @@
    <http://www.gnu.org/licenses/>.  */
 
 /* Define multiple versions only for the definition in libc.  */
+#include <wchar.h>
+
 #if IS_IN (libc)
-# define __wcsnlen __redirect_wcsnlen
-# include <wchar.h>
-# undef __wcsnlen
+
+extern typeof (__wcsnlen) __redirect_wcsnlen;
 
 # define SYMBOL_NAME wcsnlen
 # include <init-arch.h>
@@ -47,5 +48,6 @@ IFUNC_SELECTOR (void)
 }
 
 libc_ifunc_redirected (__redirect_wcsnlen, __wcsnlen, IFUNC_SELECTOR ());
-weak_alias (__wcsnlen, wcsnlen);
+libc_hidden_def (__wcsnlen)
+weak_alias (__wcsnlen, wcsnlen)
 #endif
diff --git a/sysdeps/x86_64/strchrnul.S b/sysdeps/x86_64/strchrnul.S
index 149f3a9ced..5f11f592a7 100644
--- a/sysdeps/x86_64/strchrnul.S
+++ b/sysdeps/x86_64/strchrnul.S
@@ -24,4 +24,5 @@
 #define AS_STRCHRNUL
 #include "strchr.S"
 
+libc_hidden_def (__strchrnul)
 weak_alias (__strchrnul, strchrnul)
diff --git a/sysdeps/x86_64/wcslen.S b/sysdeps/x86_64/wcslen.S
index 9f5f723227..f84cbed198 100644
--- a/sysdeps/x86_64/wcslen.S
+++ b/sysdeps/x86_64/wcslen.S
@@ -234,5 +234,5 @@ L(exit_tail7):
 	ret
 
 END (__wcslen)
-
+libc_hidden_def (__wcslen)
 weak_alias(__wcslen, wcslen)