]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
WIP finer-grained, more aggressive local PLT call check zack/wip-check-localplt-2
authorZack Weinberg <zackw@panix.com>
Sun, 18 Mar 2018 21:01:06 +0000 (17:01 -0400)
committerZack Weinberg <zackw@panix.com>
Mon, 26 Mar 2018 13:05:19 +0000 (09:05 -0400)
227 files changed:
crypt/crypt-entry.c
crypt/crypt-private.h
crypt/md5-crypt.c
crypt/md5.h
crypt/sha256-crypt.c
crypt/sha256.c
crypt/sha256.h
crypt/sha512-crypt.c
crypt/sha512.c
crypt/sha512.h
dirent/dirfd.c
elf/Makefile
elf/localplt-common.data [new file with mode: 0644]
include/complex.h
include/dirent.h
include/glob.h
include/libm-symbols.h [new file with mode: 0644]
include/math.h
include/mqueue.h
include/resolv.h
include/setjmp.h
include/stdio.h
include/stdlib.h
include/string.h
include/wchar.h
include/wctype.h
intl/loadinfo.h
libio/fileops.c
libio/genops.c
libio/iofclose.c
libio/iofdopen.c
libio/iofgetpos.c
libio/iofgetpos64.c
libio/iofopen.c
libio/iofopncook.c
libio/iofsetpos.c
libio/iofsetpos64.c
libio/iolibio.h
libio/iopopen.c
libio/iosetvbuf.c
libio/libio.h
libio/libioP.h
malloc/malloc.c
malloc/mtrace.c
math/math-svid-compat.h
math/s_casin_template.c
math/s_casinh_template.c
math/s_ccosh_template.c
math/s_cexp_template.c
math/s_clog_template.c
math/s_csqrt_template.c
math/s_ldexp_template.c
math/w_atan2_compat.c
math/w_atan2_template.c
math/w_atan2f_compat.c
math/w_atan2l_compat.c
math/w_hypot_compat.c
math/w_hypot_template.c
math/w_hypotf_compat.c
math/w_hypotl_compat.c
math/w_ilogb_template.c
math/w_log_compat.c
math/w_log_template.c
math/w_logl_compat.c
math/w_sqrt_compat.c
math/w_sqrt_template.c
math/w_sqrtf_compat.c
math/w_sqrtl_compat.c
posix/getopt_int.h
posix/glob-lstat-compat.c
posix/glob.c
posix/glob64-lstat-compat.c
posix/glob64.c
posix/glob_pattern_p.c
resolv/compat-gethnamaddr.c
resolv/res_hconf.h
resolv/res_send.c
scripts/check-localplt-2.sh [new file with mode: 0755]
stdio-common/psiginfo.c
stdio-common/vfscanf.c
string/memrchr.c
string/strchrnul.c
string/strncase.c
sunrpc/clnt_tcp.c
sunrpc/clnt_udp.c
sunrpc/clnt_unix.c
sunrpc/create_xid.c
sunrpc/des_crypt.c
sunrpc/des_impl.c
sunrpc/pmap_rmt.c
sysdeps/aarch64/strchrnul.S
sysdeps/generic/math_private.h
sysdeps/generic/math_private_calls.h
sysdeps/gnu/glob-lstat-compat.c
sysdeps/i386/fpu/s_rintl.c
sysdeps/i386/i686/multiarch/memrchr.c
sysdeps/i386/i686/multiarch/strncase.c
sysdeps/i386/i686/multiarch/wcslen.c
sysdeps/i386/strchrnul.S
sysdeps/ieee754/dbl-64/mpa.h
sysdeps/ieee754/dbl-64/s_erf.c
sysdeps/ieee754/dbl-64/s_expm1.c
sysdeps/ieee754/dbl-64/s_nextup.c
sysdeps/ieee754/dbl-64/s_sincos.c
sysdeps/ieee754/dbl-64/wordsize-64/s_frexp.c
sysdeps/ieee754/dbl-64/wordsize-64/s_nearbyint.c
sysdeps/ieee754/dbl-64/wordsize-64/s_round.c
sysdeps/ieee754/flt-32/s_atanf.c
sysdeps/ieee754/flt-32/s_ceilf.c
sysdeps/ieee754/flt-32/s_erff.c
sysdeps/ieee754/flt-32/s_expm1f.c
sysdeps/ieee754/flt-32/s_floorf.c
sysdeps/ieee754/flt-32/s_frexpf.c
sysdeps/ieee754/flt-32/s_nearbyintf.c
sysdeps/ieee754/flt-32/s_nextupf.c
sysdeps/ieee754/flt-32/s_rintf.c
sysdeps/ieee754/flt-32/s_roundevenf.c
sysdeps/ieee754/flt-32/s_roundf.c
sysdeps/ieee754/flt-32/s_truncf.c
sysdeps/ieee754/ldbl-128/s_atanl.c
sysdeps/ieee754/ldbl-128/s_ceill.c
sysdeps/ieee754/ldbl-128/s_cosl.c
sysdeps/ieee754/ldbl-128/s_erfl.c
sysdeps/ieee754/ldbl-128/s_floorl.c
sysdeps/ieee754/ldbl-128/s_frexpl.c
sysdeps/ieee754/ldbl-128/s_nearbyintl.c
sysdeps/ieee754/ldbl-128/s_nextupl.c
sysdeps/ieee754/ldbl-128/s_rintl.c
sysdeps/ieee754/ldbl-128/s_roundevenl.c
sysdeps/ieee754/ldbl-128/s_roundl.c
sysdeps/ieee754/ldbl-128/s_sincosl.c
sysdeps/ieee754/ldbl-128/s_sinl.c
sysdeps/ieee754/ldbl-128/s_truncl.c
sysdeps/ieee754/ldbl-96/s_cosl.c
sysdeps/ieee754/ldbl-96/s_erfl.c
sysdeps/ieee754/ldbl-96/s_frexpl.c
sysdeps/ieee754/ldbl-96/s_nextupl.c
sysdeps/ieee754/ldbl-96/s_roundevenl.c
sysdeps/ieee754/ldbl-96/s_roundl.c
sysdeps/ieee754/ldbl-96/s_signbitl.c
sysdeps/ieee754/ldbl-96/s_sincosl.c
sysdeps/ieee754/ldbl-96/s_sinl.c
sysdeps/m68k/strchrnul.S
sysdeps/mach/hurd/dirfd.c
sysdeps/posix/dirfd.c
sysdeps/powerpc/powerpc32/power4/multiarch/memrchr.c
sysdeps/powerpc/powerpc32/power4/multiarch/strchrnul.c
sysdeps/powerpc/powerpc32/power7/memrchr.S
sysdeps/powerpc/powerpc64/multiarch/memrchr.c
sysdeps/powerpc/powerpc64/multiarch/strchrnul.c
sysdeps/powerpc/powerpc64/power7/memrchr.S
sysdeps/powerpc/powerpc64/power8/memrchr.S
sysdeps/powerpc/powerpc64/power8/strchr.S
sysdeps/s390/multiarch/memrchr.c
sysdeps/s390/multiarch/strchrnul.c
sysdeps/s390/multiarch/wcslen.c
sysdeps/s390/multiarch/wcsnlen.c
sysdeps/tile/strchrnul.c
sysdeps/unix/sysv/linux/arm/umount.c
sysdeps/unix/sysv/linux/generic/umount.c
sysdeps/unix/sysv/linux/glob-lstat-compat.c
sysdeps/unix/sysv/linux/glob64-lstat-compat.c
sysdeps/unix/sysv/linux/ia64/syscalls.list
sysdeps/unix/sysv/linux/mips/mips64/umount.c
sysdeps/unix/sysv/linux/umount2.S
sysdeps/unix/sysv/linux/x86_64/compat-timer.h
sysdeps/unix/sysv/linux/x86_64/timer_create.c
sysdeps/unix/sysv/linux/x86_64/timer_delete.c
sysdeps/unix/sysv/linux/x86_64/timer_getoverr.c
sysdeps/unix/sysv/linux/x86_64/timer_gettime.c
sysdeps/unix/sysv/linux/x86_64/timer_settime.c
sysdeps/unix/sysv/linux/x86_64/umount.c
sysdeps/unix/sysv/mount-internal.h [new file with mode: 0644]
sysdeps/x86/fpu/include/bits/fenv.h
sysdeps/x86_64/fpu/multiarch/e_log-avx.c
sysdeps/x86_64/fpu/multiarch/e_log-fma.c
sysdeps/x86_64/fpu/multiarch/e_log-fma4.c
sysdeps/x86_64/fpu/multiarch/e_logf-fma.c
sysdeps/x86_64/fpu/multiarch/e_powf.c
sysdeps/x86_64/fpu/multiarch/s_atan-avx.c
sysdeps/x86_64/fpu/multiarch/s_atan-fma.c
sysdeps/x86_64/fpu/multiarch/s_atan-fma4.c
sysdeps/x86_64/fpu/multiarch/s_atan.c
sysdeps/x86_64/fpu/multiarch/s_ceil-c.c
sysdeps/x86_64/fpu/multiarch/s_ceil.c
sysdeps/x86_64/fpu/multiarch/s_ceilf.c
sysdeps/x86_64/fpu/multiarch/s_cosf.c
sysdeps/x86_64/fpu/multiarch/s_floor-c.c
sysdeps/x86_64/fpu/multiarch/s_floor.c
sysdeps/x86_64/fpu/multiarch/s_floorf.c
sysdeps/x86_64/fpu/multiarch/s_nearbyint-c.c
sysdeps/x86_64/fpu/multiarch/s_nearbyint.c
sysdeps/x86_64/fpu/multiarch/s_nearbyintf.c
sysdeps/x86_64/fpu/multiarch/s_rint-c.c
sysdeps/x86_64/fpu/multiarch/s_rint.c
sysdeps/x86_64/fpu/multiarch/s_rintf.c
sysdeps/x86_64/fpu/multiarch/s_sin-avx.c
sysdeps/x86_64/fpu/multiarch/s_sin-fma.c
sysdeps/x86_64/fpu/multiarch/s_sin-fma4.c
sysdeps/x86_64/fpu/multiarch/s_sin.c
sysdeps/x86_64/fpu/multiarch/s_sincosf.c
sysdeps/x86_64/fpu/multiarch/s_sinf.c
sysdeps/x86_64/fpu/multiarch/s_trunc-c.c
sysdeps/x86_64/fpu/multiarch/s_trunc.c
sysdeps/x86_64/fpu/multiarch/s_truncf.c
sysdeps/x86_64/fpu/s_ceill.S
sysdeps/x86_64/fpu/s_floorl.S
sysdeps/x86_64/fpu/s_log1pl.S
sysdeps/x86_64/fpu/s_scalbnl.S
sysdeps/x86_64/fpu/s_sincosf.S
sysdeps/x86_64/fpu/s_truncl.S
sysdeps/x86_64/memrchr.S
sysdeps/x86_64/multiarch/memrchr.c
sysdeps/x86_64/multiarch/strchrnul.c
sysdeps/x86_64/multiarch/strncase.c
sysdeps/x86_64/multiarch/wcslen.c
sysdeps/x86_64/multiarch/wcsnlen.c
sysdeps/x86_64/strchrnul.S
sysdeps/x86_64/wcslen.S
wcsmbs/wcpncpy.c
wcsmbs/wcscat.c
wcsmbs/wcschrnul.c
wcsmbs/wcslen.c
wcsmbs/wcsncpy.c
wcsmbs/wcsnlen.c
wctype/wctrans.c
wctype/wctype.c

index 58691fb384508d58140148c2dd66e24dd8d8b1ca..36ec54ca090aecc1cb82bbb54d982b3b5a343519 100644 (file)
@@ -43,14 +43,20 @@ void _ufc_clearmem (char *start, int cnt);
 #define _ufc_clearmem(start, cnt)   memset(start, 0, cnt)
 #endif
 extern char *__md5_crypt_r (const char *key, const char *salt, char *buffer,
-                           int buflen);
-extern char *__md5_crypt (const char *key, const char *salt);
+                           int buflen)
+  attribute_hidden;
+extern char *__md5_crypt (const char *key, const char *salt)
+  attribute_hidden;
 extern char *__sha256_crypt_r (const char *key, const char *salt,
-                              char *buffer, int buflen);
-extern char *__sha256_crypt (const char *key, const char *salt);
+                              char *buffer, int buflen)
+  attribute_hidden;
+extern char *__sha256_crypt (const char *key, const char *salt)
+  attribute_hidden;
 extern char *__sha512_crypt_r (const char *key, const char *salt,
-                              char *buffer, int buflen);
-extern char *__sha512_crypt (const char *key, const char *salt);
+                              char *buffer, int buflen)
+  attribute_hidden;
+extern char *__sha512_crypt (const char *key, const char *salt)
+  attribute_hidden;
 
 /* Define our magic string to mark salt for MD5 encryption
    replacement.  This is meant to be the same as for other MD5 based
index 6a54002f031cd7b92ceb4de8129d66084bb47f92..ea44afa9b4002a2b0eced1806764ab886ce09827 100644 (file)
 
 /* crypt.c */
 extern void _ufc_doit_r (ufc_long itr, struct crypt_data * __restrict __data,
-                        ufc_long *res);
+                        ufc_long *res)
+  attribute_hidden;
 
 
 /* crypt_util.c */
-extern void __init_des_r (struct crypt_data * __restrict __data);
-extern void __init_des (void);
+extern void __init_des_r (struct crypt_data * __restrict __data)
+  attribute_hidden;
+extern void __init_des (void)
+  attribute_hidden;
 
 extern bool _ufc_setup_salt_r (const char *s,
-                              struct crypt_data * __restrict __data);
+                              struct crypt_data * __restrict __data)
+  attribute_hidden;
 extern void _ufc_mk_keytab_r (const char *key,
-                             struct crypt_data * __restrict __data);
+                             struct crypt_data * __restrict __data)
+  attribute_hidden;
 extern void _ufc_dofinalperm_r (ufc_long *res,
-                               struct crypt_data * __restrict __data);
+                               struct crypt_data * __restrict __data)
+  attribute_hidden;
 extern void _ufc_output_conversion_r (ufc_long v1, ufc_long v2,
                                      const char *salt,
-                                     struct crypt_data * __restrict __data);
+                                     struct crypt_data * __restrict __data)
+  attribute_hidden;
 
 extern void __setkey_r (const char *__key,
-                            struct crypt_data * __restrict __data);
+                            struct crypt_data * __restrict __data)
+  attribute_hidden;
 extern void __encrypt_r (char * __restrict __block, int __edflag,
-                             struct crypt_data * __restrict __data);
+                             struct crypt_data * __restrict __data)
+  attribute_hidden;
 
 /* crypt-entry.c */
 extern char *__crypt_r (const char *__key, const char *__salt,
-                            struct crypt_data * __restrict __data);
+                            struct crypt_data * __restrict __data)
+  attribute_hidden;
 extern char *fcrypt (const char *key, const char *salt);
 
 extern void __b64_from_24bit (char **cp, int *buflen,
                              unsigned int b2, unsigned int b1, unsigned int b0,
-                             int n);
+                             int n)
+  attribute_hidden;
 
 #endif  /* crypt-private.h */
index 3cf02ff74c80b825aaea75fa6f5d9d13cd5862e9..bf532b167e8bb1c85508ad1052440faf5c1a8452 100644 (file)
@@ -82,8 +82,10 @@ static const char md5_salt_prefix[] = "$1$";
 
 /* Prototypes for local functions.  */
 extern char *__md5_crypt_r (const char *key, const char *salt,
-                           char *buffer, int buflen);
-extern char *__md5_crypt (const char *key, const char *salt);
+                           char *buffer, int buflen)
+  attribute_hidden;
+extern char *__md5_crypt (const char *key, const char *salt)
+  attribute_hidden;
 
 
 /* This entry point is equivalent to the `crypt' function in Unix
index 57959bef0363d3223ce50767f5abbc8e465f9c9e..fe395b9fad05b9b99bd035ccf899cb3172c55b9c 100644 (file)
@@ -72,6 +72,10 @@ typedef uintptr_t md5_uintptr;
 typedef unsigned long int md5_uintptr;
 #endif
 
+#ifdef _ISOMAC
+#define attribute_hidden /* nothing */
+#endif
+
 /* Structure to save state of computation between the single steps.  */
 struct md5_ctx
 {
@@ -96,21 +100,24 @@ struct md5_ctx
 
 /* Initialize structure containing state of computation.
    (RFC 1321, 3.3: Step 3)  */
-extern void __md5_init_ctx (struct md5_ctx *ctx) __THROW;
+extern void __md5_init_ctx (struct md5_ctx *ctx)
+  __THROW attribute_hidden;
 
 /* Starting with the result of former calls of this function (or the
    initialization function update the context for the next LEN bytes
    starting at BUFFER.
    It is necessary that LEN is a multiple of 64!!! */
 extern void __md5_process_block (const void *buffer, size_t len,
-                                struct md5_ctx *ctx) __THROW;
+                                struct md5_ctx *ctx)
+  __THROW attribute_hidden;
 
 /* Starting with the result of former calls of this function (or the
    initialization function update the context for the next LEN bytes
    starting at BUFFER.
    It is NOT required that LEN is a multiple of 64.  */
 extern void __md5_process_bytes (const void *buffer, size_t len,
-                                struct md5_ctx *ctx) __THROW;
+                                struct md5_ctx *ctx)
+  __THROW attribute_hidden;
 
 /* Process the remaining bytes in the buffer and put result from CTX
    in first 16 bytes following RESBUF.  The result is always in little
@@ -119,7 +126,8 @@ extern void __md5_process_bytes (const void *buffer, size_t len,
 
    IMPORTANT: On some systems it is required that RESBUF is correctly
    aligned for a 32 bits value.  */
-extern void *__md5_finish_ctx (struct md5_ctx *ctx, void *resbuf) __THROW;
+extern void *__md5_finish_ctx (struct md5_ctx *ctx, void *resbuf)
+  __THROW attribute_hidden;
 
 
 /* Put result from CTX in first 16 bytes following RESBUF.  The result is
@@ -128,19 +136,21 @@ extern void *__md5_finish_ctx (struct md5_ctx *ctx, void *resbuf) __THROW;
 
    IMPORTANT: On some systems it is required that RESBUF is correctly
    aligned for a 32 bits value.  */
-extern void *__md5_read_ctx (const struct md5_ctx *ctx, void *resbuf) __THROW;
+extern void *__md5_read_ctx (const struct md5_ctx *ctx, void *resbuf)
+  __THROW attribute_hidden;
 
 
 /* Compute MD5 message digest for bytes read from STREAM.  The
    resulting message digest number will be written into the 16 bytes
    beginning at RESBLOCK.  */
-extern int __md5_stream (FILE *stream, void *resblock) __THROW;
+extern int __md5_stream (FILE *stream, void *resblock)
+  __THROW attribute_hidden;
 
 /* Compute MD5 message digest for LEN bytes beginning at BUFFER.  The
    result is always in little endian byte order, so that a byte-wise
    output yields to the wanted ASCII representation of the message
    digest.  */
-extern void *__md5_buffer (const char *buffer, size_t len,
-                          void *resblock) __THROW;
+extern void *__md5_buffer (const char *buffer, size_t len, void *resblock)
+  __THROW attribute_hidden;
 
 #endif /* md5.h */
index d1fed1d6a68e1e5c6ed5afd403fdb0a93b675844..65ee6a87e0000b96a7bfbafcb0e9c5313523eb3b 100644 (file)
@@ -94,8 +94,10 @@ static const char sha256_rounds_prefix[] = "rounds=";
 
 /* Prototypes for local functions.  */
 extern char *__sha256_crypt_r (const char *key, const char *salt,
-                              char *buffer, int buflen);
-extern char *__sha256_crypt (const char *key, const char *salt);
+                              char *buffer, int buflen)
+  attribute_hidden;
+extern char *__sha256_crypt (const char *key, const char *salt)
+  attribute_hidden;
 
 
 char *
index 15b04086cbfc3bbe3b19af73df6f19e1d5e9b50f..3efac712d1354487f6280495b2bdc636e66d3519 100644 (file)
@@ -81,7 +81,8 @@ static const uint32_t K[64] =
     0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2
   };
 
-void __sha256_process_block (const void *, size_t, struct sha256_ctx *);
+extern void __sha256_process_block (const void *, size_t, struct sha256_ctx *)
+  attribute_hidden;
 
 /* Initialize structure containing state of computation.
    (FIPS 180-2:5.3.2)  */
index bf81870b6d8afa1cdcbe1c106fb87bee934f6d2d..b92ddb068f036713b826a0a519be29f36fac7381 100644 (file)
@@ -47,16 +47,22 @@ struct sha256_ctx
   };
 };
 
+#ifdef _ISOMAC
+#define attribute_hidden /* nothing */
+#endif
+
 /* Initialize structure containing state of computation.
    (FIPS 180-2: 5.3.2)  */
-extern void __sha256_init_ctx (struct sha256_ctx *ctx) __THROW;
+extern void __sha256_init_ctx (struct sha256_ctx *ctx)
+  __THROW attribute_hidden;
 
 /* Starting with the result of former calls of this function (or the
    initialization function update the context for the next LEN bytes
    starting at BUFFER.
    It is NOT required that LEN is a multiple of 64.  */
 extern void __sha256_process_bytes (const void *buffer, size_t len,
-                                   struct sha256_ctx *ctx) __THROW;
+                                   struct sha256_ctx *ctx)
+  __THROW attribute_hidden;
 
 /* Process the remaining bytes in the buffer and put result from CTX
    in first 32 bytes following RESBUF.
@@ -64,6 +70,6 @@ extern void __sha256_process_bytes (const void *buffer, size_t len,
    IMPORTANT: On some systems it is required that RESBUF is correctly
    aligned for a 32 bits value.  */
 extern void *__sha256_finish_ctx (struct sha256_ctx *ctx, void *resbuf)
-  __THROW;
+  __THROW attribute_hidden;
 
 #endif /* sha256.h */
index bd099cd0e02ad3a2efe603118f5bf1cafd0b48bc..f86e15b2413e56eeb88bceeaa643654717f9a432 100644 (file)
@@ -94,8 +94,10 @@ static const char sha512_rounds_prefix[] = "rounds=";
 
 /* Prototypes for local functions.  */
 extern char *__sha512_crypt_r (const char *key, const char *salt,
-                              char *buffer, int buflen);
-extern char *__sha512_crypt (const char *key, const char *salt);
+                              char *buffer, int buflen)
+  attribute_hidden;
+extern char *__sha512_crypt (const char *key, const char *salt)
+  attribute_hidden;
 
 
 char *
index ab2c7f1fbb14a489d4faaed44f88a839b55880dd..a35ff1a0a04b43cf6fb34e073a8be3415d63ad13 100644 (file)
@@ -102,7 +102,8 @@ static const uint64_t K[80] =
   };
 
 void __sha512_process_block (const void *buffer, size_t len,
-                            struct sha512_ctx *ctx);
+                            struct sha512_ctx *ctx)
+  attribute_hidden;
 
 /* Initialize structure containing state of computation.
    (FIPS 180-2:5.3.3)  */
index 7b27aad2d2a938c56a4f2dcebf302faf5d834bbb..4f8f9e9ea0fa83ad91075806153404c7a3563c96 100644 (file)
@@ -50,16 +50,22 @@ struct sha512_ctx
   };
 };
 
+#ifdef _ISOMAC
+#define attribute_hidden /* nothing */
+#endif
+
 /* Initialize structure containing state of computation.
    (FIPS 180-2: 5.3.3)  */
-extern void __sha512_init_ctx (struct sha512_ctx *ctx) __THROW;
+extern void __sha512_init_ctx (struct sha512_ctx *ctx)
+  __THROW attribute_hidden;
 
 /* Starting with the result of former calls of this function (or the
    initialization function update the context for the next LEN bytes
    starting at BUFFER.
    It is NOT required that LEN is a multiple of 128.  */
 extern void __sha512_process_bytes (const void *buffer, size_t len,
-                                   struct sha512_ctx *ctx) __THROW;
+                                   struct sha512_ctx *ctx)
+  __THROW attribute_hidden;
 
 /* Process the remaining bytes in the buffer and put result from CTX
    in first 64 bytes following RESBUF.
@@ -67,6 +73,6 @@ extern void __sha512_process_bytes (const void *buffer, size_t len,
    IMPORTANT: On some systems it is required that RESBUF is correctly
    aligned for a 64 bits value.  */
 extern void *__sha512_finish_ctx (struct sha512_ctx *ctx, void *resbuf)
-  __THROW;
+  __THROW attribute_hidden;
 
 #endif /* sha512.h */
index b45bf83f5ad1b3eb00845579a9d4e4d8c6148bea..20fcc4ddd5befb92f5f1742d87f42f437b1c2ecb 100644 (file)
@@ -26,6 +26,6 @@ __dirfd (DIR *dirp)
   __set_errno (ENOSYS);
   return -1;
 }
-
+libc_hidden_def (__dirfd)
 weak_alias (__dirfd, dirfd)
 stub_warning (dirfd)
index 59bcca504672ef185d7925f40485cefef8525e6a..92c49dce2df570b73fe8f6329c4f0bc7d6cf33f5 100644 (file)
@@ -346,7 +346,7 @@ ifeq ($(run-built-tests),yes)
 tests-special += $(objpfx)tst-pathopt.out $(objpfx)tst-rtld-load-self.out
 endif
 tests-special += $(objpfx)check-textrel.out $(objpfx)check-execstack.out \
-                $(objpfx)check-localplt.out
+                $(objpfx)check-localplt.out $(objpfx)check-localplt-2.out
 endif
 
 ifeq ($(run-built-tests),yes)
@@ -1132,6 +1132,23 @@ $(objpfx)check-localplt.out: $(..)scripts/check-localplt.awk \
          LC_ALL=C $(AWK) -f $< $(filter %localplt.data,$^) - \
          > $@; \
        $(evaluate-test)
+
+$(objpfx)check-localplt-2.out: $(..)scripts/check-localplt-2.sh \
+                              localplt-common.data localplt.data \
+                              $(localplt-built-dso:.so=_pic.a)
+       AWK="$(AWK)" $(SHELL) $(..)scripts/check-localplt-2.sh \
+         $(filter %.data, $^) -- $(filter %.a, $^) > $@; \
+       $(evaluate-test)
+
+# check-localplt-2 needs _pic.a libraries for every entry in
+# $(localplt-built-dso).
+$(objpfx)ld_pic.a: $(objpfx)rtld-libc.a $(all-rtld-routines:%=$(objpfx)%.os)
+       -rm -f $@.new
+       cp $< $@.new
+       $(AR) cq$(verbose) $@.new $(filter-out %rtld-libc.a, $^)
+       mv -f $@.new $@
+
+generated += $(objpfx)ld_pic.a
 endif
 
 $(objpfx)tst-dlopenrpathmod.so: $(libdl)
diff --git a/elf/localplt-common.data b/elf/localplt-common.data
new file mode 100644 (file)
index 0000000..1885059
--- /dev/null
@@ -0,0 +1,37 @@
+# This file is used by check-localplt-2.sh.
+# Blank lines and lines beginning with '#' are ignored.
+# All other lines should be in the form
+# LIBRARY: SYMBOL
+# Calls from LIBRARY to SYMBOL via the PLT, or equivalent,
+# are allowed.  LIBRARY may be '*' to indicate that calls
+# to SYMBOL are allowed from any library.
+
+# To allow for interposition, all calls to malloc and related
+# functions should go through the PLT.
+*: malloc
+*: calloc
+*: realloc
+*: free
+
+# Similarly for matherr.
+libm.so: matherr
+
+# __pthread_unwind has stub definitions in ld.so and libc.so, but both
+# libraries should call the definition in libpthread.so if it's loaded.
+libc.so: __pthread_unwind
+ld.so: __pthread_unwind
+
+# FIXME: These symbols _should_ be getting called directly, but
+# aren't, due to nasty interactions between GCC's builtin function
+# optimizations and our symbol hacks.
+*: __GI_memcmp
+*: __GI_memcpy
+*: __GI_mempcpy
+*: __GI_memset
+*: __GI_stpcpy
+*: __GI_strchr
+*: __GI_strcpy
+*: __GI_strlen
+*: __GI_fwrite
+*: __GI_fwrite_unlocked
+*: _Unwind_Resume
index 2c86709ced7eee9d51ebd88d2e4f8d1136ff4a66..cdcca89db00dc051883cb81e4c366455d9bf8f7a 100644 (file)
@@ -2,15 +2,29 @@
 # include <math/complex.h>
 
 # ifndef _ISOMAC
+#  include <libm-symbols.h>
+
+libm_hidden_mathcall (casin)
+libm_hidden_mathcall (casinh)
+libm_hidden_mathcall (ccosh)
+libm_hidden_mathcall (cexp)
+libm_hidden_mathcall (clog)
+libm_hidden_mathcall (csqrt)
+
 /* Return the complex inverse hyperbolic sine of finite nonzero Z,
    with the imaginary part of the result subtracted from pi/2 if ADJ
    is nonzero.  */
-extern complex float __kernel_casinhf (complex float z, int adj);
-extern complex double __kernel_casinh (complex double z, int adj);
-extern complex long double __kernel_casinhl (complex long double z, int adj);
+extern complex float __kernel_casinhf (complex float z, int adj)
+  attribute_hidden;
+extern complex double __kernel_casinh (complex double z, int adj)
+  attribute_hidden;
+extern complex long double __kernel_casinhl (complex long double z, int adj)
+  attribute_hidden;
 #  if __HAVE_DISTINCT_FLOAT128
-extern __CFLOAT128 __kernel_casinhf128 (__CFLOAT128 z, int adj);
+extern __CFLOAT128 __kernel_casinhf128 (__CFLOAT128 z, int adj)
+  attribute_hidden;
 #  endif
-# endif
 
+
+# endif
 #endif
index cc8f1895dfd79d12929367b615f3e951c2548e7c..faccbfbb7afeefb42cd128678d0446746c04754f 100644 (file)
@@ -49,6 +49,7 @@ extern DIR *__alloc_dir (int fd, bool close_fd, int flags,
 extern __typeof (rewinddir) __rewinddir;
 extern __typeof (seekdir) __seekdir;
 extern __typeof (dirfd) __dirfd;
+libc_hidden_proto (__dirfd)
 
 extern void __scandir_cancel_handler (void *arg) attribute_hidden;
 extern int __scandir_tail (DIR *dp,
index 1d2f78793eda4c07adad76f679122a9ba106a428..1866bc8fcf19f5e9e12074f38e1c76f3980598e0 100644 (file)
@@ -8,11 +8,16 @@ libc_hidden_proto (globfree)
 libc_hidden_proto (globfree64)
 
 /* Now define the internal interfaces.  */
-extern int __glob_pattern_p (const char *__pattern, int __quote);
-extern int __glob64 (const char *__pattern, int __flags,
-                    int (*__errfunc) (const char *, int),
-                    glob64_t *__pglob);
+extern typeof (glob_pattern_p) __glob_pattern_p;
+libc_hidden_proto (__glob_pattern_p)
+extern typeof (glob) __glob;
+libc_hidden_proto (__glob)
+extern typeof (glob) __glob_lstat_compat;
+libc_hidden_proto (__glob_lstat_compat)
+extern typeof (glob64) __glob64;
 libc_hidden_proto (__glob64)
+extern typeof (glob64) __glob64_lstat_compat;
+libc_hidden_proto (__glob64_lstat_compat)
 #endif
 
 #endif
diff --git a/include/libm-symbols.h b/include/libm-symbols.h
new file mode 100644 (file)
index 0000000..8fb6e6b
--- /dev/null
@@ -0,0 +1,84 @@
+/* Additional support macros for symbol management, used for libm.
+   Copyright (C) 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 _LIBM_SYMBOLS_H
+#define _LIBM_SYMBOLS_H 1
+
+#if IS_IN (libc) || IS_IN (libm)
+
+# if defined __NO_LONG_DOUBLE_MATH && !__HAVE_DISTINCT_FLOAT128
+
+#  define libm_hidden_mathcall(sym)            \
+  libm_hidden_proto (__##sym)                  \
+  libm_hidden_proto (__##sym##f)
+
+#  define libc_libm_hidden_mathcall(sym)       \
+  hidden_proto (__##sym)                       \
+  hidden_proto (__##sym##f)
+
+# elif !defined __NO_LONG_DOUBLE_MATH && !__HAVE_DISTINCT_FLOAT128
+
+#  define libm_hidden_mathcall(sym)            \
+  libm_hidden_proto (__##sym)                  \
+  libm_hidden_proto (__##sym##f)               \
+  libm_hidden_proto (__##sym##l)
+
+#  define libc_libm_hidden_mathcall(sym)       \
+  hidden_proto (__##sym)                       \
+  hidden_proto (__##sym##f)                    \
+  hidden_proto (__##sym##l)
+
+# elif defined __NO_LONG_DOUBLE_MATH && __HAVE_DISTINCT_FLOAT128
+
+#  define libm_hidden_mathcall(sym)            \
+  libm_hidden_proto (__##sym)                  \
+  libm_hidden_proto (__##sym##f)               \
+  libm_hidden_proto (__##sym##f128)
+
+#  define libm_hidden_mathcall(sym)            \
+  hidden_proto (__##sym)                       \
+  hidden_proto (__##sym##f)                    \
+  hidden_proto (__##sym##f128)
+
+# else /* !defined __NO_LONG_DOUBLE_MATH && __HAVE_DISTINCT_FLOAT128 */
+
+#  define libm_hidden_mathcall(sym)            \
+  libm_hidden_proto (__##sym)                  \
+  libm_hidden_proto (__##sym##f)               \
+  libm_hidden_proto (__##sym##l)               \
+  libm_hidden_proto (__##sym##f128)
+
+#  define libc_libm_hidden_mathcall(sym)       \
+  hidden_proto (__##sym)                       \
+  hidden_proto (__##sym##f)                    \
+  hidden_proto (__##sym##l)                    \
+  hidden_proto (__##sym##f128)
+
+# endif
+#else
+# define libm_hidden_mathcall(sym)
+# define libc_libm_hidden_mathcall(sym)
+#endif
+
+#if IS_IN (libm)
+# define libm_attr_hidden attribute_hidden
+#else
+# define libm_attr_hidden /* nothing */
+#endif
+
+#endif /* libm-symbols.h */
index e21d34b868c10ea06695781671eb793148aff37c..3e4e020915d85bef7e7b9794ac86ede053119ffb 100644 (file)
@@ -7,64 +7,56 @@
 #include <math/math.h>
 
 #ifndef _ISOMAC
+# include <libm-symbols.h>
+
 /* Now define the internal interfaces.  */
 extern int __signgam;
 
-# if IS_IN (libc) || IS_IN (libm)
-hidden_proto (__finite)
-hidden_proto (__isinf)
-hidden_proto (__isnan)
-hidden_proto (__finitef)
-hidden_proto (__isinff)
-hidden_proto (__isnanf)
-
-#  ifndef __NO_LONG_DOUBLE_MATH
-hidden_proto (__finitel)
-hidden_proto (__isinfl)
-hidden_proto (__isnanl)
-#  endif
-
-#  if __HAVE_DISTINCT_FLOAT128
-hidden_proto (__finitef128)
-hidden_proto (__isinff128)
-hidden_proto (__isnanf128)
-hidden_proto (__signbitf128)
-#  endif
-# endif
-
-libm_hidden_proto (__fpclassify)
-libm_hidden_proto (__fpclassifyf)
-libm_hidden_proto (__issignaling)
-libm_hidden_proto (__issignalingf)
-libm_hidden_proto (__exp)
-libm_hidden_proto (__expf)
-libm_hidden_proto (__roundeven)
+libc_libm_hidden_mathcall (finite)
+libc_libm_hidden_mathcall (isinf)
+libc_libm_hidden_mathcall (isnan)
+libc_libm_hidden_mathcall (scalbn)
+libc_libm_hidden_mathcall (signbit)
 
-# ifndef __NO_LONG_DOUBLE_MATH
-libm_hidden_proto (__fpclassifyl)
-libm_hidden_proto (__issignalingl)
-libm_hidden_proto (__expl)
-libm_hidden_proto (__expm1l)
-# endif
-
-# if __HAVE_DISTINCT_FLOAT128
-libm_hidden_proto (__fpclassifyf128)
-libm_hidden_proto (__issignalingf128)
-libm_hidden_proto (__expf128)
-libm_hidden_proto (__expm1f128)
-# endif
+libm_hidden_mathcall (atan)
+libm_hidden_mathcall (atan2)
+libm_hidden_mathcall (ceil)
+libm_hidden_mathcall (cos)
+libm_hidden_mathcall (erf)
+libm_hidden_mathcall (erfc)
+libm_hidden_mathcall (exp)
+libm_hidden_mathcall (expm1)
+libm_hidden_mathcall (floor)
+libm_hidden_mathcall (fpclassify)
+libm_hidden_mathcall (frexp)
+libm_hidden_mathcall (hypot)
+libm_hidden_mathcall (ilogb)
+libm_hidden_mathcall (issignaling)
+libm_hidden_mathcall (ldexp)
+libm_hidden_mathcall (log)
+libm_hidden_mathcall (log1p)
+libm_hidden_mathcall (nearbyint)
+libm_hidden_mathcall (nextup)
+libm_hidden_mathcall (rint)
+libm_hidden_mathcall (round)
+libm_hidden_mathcall (roundeven)
+libm_hidden_mathcall (scalbln)
+libm_hidden_mathcall (sin)
+libm_hidden_mathcall (sincos)
+libm_hidden_mathcall (sqrt)
+libm_hidden_mathcall (trunc)
 
 # if !(defined __FINITE_MATH_ONLY__ && __FINITE_MATH_ONLY__ > 0)
 #  ifndef NO_MATH_REDIRECT
 /* Declare sqrt for use within GLIBC.  Compilers typically inline sqrt as a
    single instruction.  Use an asm to avoid use of PLTs if it doesn't.  */
-float (sqrtf) (float) asm ("__ieee754_sqrtf");
-double (sqrt) (double) asm ("__ieee754_sqrt");
+float (sqrtf) (float) asm ("__ieee754_sqrtf") libm_attr_hidden;
+double (sqrt) (double) asm ("__ieee754_sqrt") libm_attr_hidden;
 #   ifndef __NO_LONG_DOUBLE_MATH
-long double (sqrtl) (long double) asm ("__ieee754_sqrtl");
+long double (sqrtl) (long double) asm ("__ieee754_sqrtl") libm_attr_hidden;
 #   endif
 #   if __HAVE_DISTINCT_FLOAT128 > 0
-_Float128 (sqrtf128) (_Float128) asm ("__ieee754_sqrtf128");
+_Float128 (sqrtf128) (_Float128) asm ("__ieee754_sqrtf128") libm_attr_hidden;
 #   endif
 #  endif
 # endif
index 3c66f1711e3713516794a4636baa2c50c7e30f81..58af372971e14e30ca712d66ce67fd034630d9a2 100644 (file)
@@ -2,6 +2,7 @@
 
 #ifndef _ISOMAC
 # if IS_IN (librt)
+extern __typeof (mq_open) __mq_open __THROW __nonnull ((1)) attribute_hidden;
 hidden_proto (mq_timedsend)
 extern __typeof (mq_timedsend) __mq_timedsend __nonnull ((2, 5));
 hidden_proto (__mq_timedsend)
index daf4a74777c431b3e8572a806380631975446435..524ee902acf4f134fa94e23f8a7d75f427bcf57b 100644 (file)
@@ -31,8 +31,6 @@ extern struct hostent *_gethtbyname2 (const char *__name, int __af);
 struct hostent *_gethtbyaddr (const char *addr, size_t __len, int __af);
 extern uint32_t _getlong (const unsigned char *__src);
 extern uint16_t _getshort (const unsigned char *__src);
-extern int res_ourserver_p (const res_state __statp,
-                           const struct sockaddr_in6 *__inp);
 extern void __res_iclose (res_state statp, bool free_addr);
 libc_hidden_proto (__res_ninit)
 libc_hidden_proto (__res_nclose)
index 263bc64b3daa1ab252662017539093c1a80e0ea3..49f7fe8dfba2effdf8f19cd39d4a751da3833f96 100644 (file)
@@ -17,7 +17,8 @@ extern void ____longjmp_chk (__jmp_buf __env, int __val)
    Always returns zero, for convenience.  */
 extern int __sigjmp_save (jmp_buf __env, int __savemask);
 
-extern void _longjmp_unwind (jmp_buf env, int val);
+extern void _longjmp_unwind (jmp_buf env, int val)
+  attribute_hidden;
 
 extern void __libc_siglongjmp (sigjmp_buf env, int val)
          __attribute__ ((noreturn));
index f140813ad6bc0e916dab39797454cdbd1c101ed6..01c324703daf901b6ad65eb38d28b47df4d7fc65 100644 (file)
@@ -133,10 +133,13 @@ extern int _sys_nerr_internal attribute_hidden;
 libc_hidden_proto (__asprintf)
 #  if IS_IN (libc)
 extern FILE *_IO_new_fopen (const char*, const char*);
+libc_hidden_proto (_IO_new_fopen)
 #   define fopen(fname, mode) _IO_new_fopen (fname, mode)
 extern FILE *_IO_new_fdopen (int, const char*);
+libc_hidden_proto (_IO_new_fdopen)
 #   define fdopen(fd, mode) _IO_new_fdopen (fd, mode)
 extern int _IO_new_fclose (FILE*);
+libc_hidden_proto (_IO_new_fclose)
 #   define fclose(fp) _IO_new_fclose (fp)
 extern int _IO_fputs (const char*, FILE*);
 libc_hidden_proto (_IO_fputs)
@@ -146,8 +149,10 @@ libc_hidden_proto (_IO_fputs)
 libc_hidden_proto (fputs)
 #   define fputs(str, fp) _IO_fputs (str, fp)
 extern int _IO_new_fsetpos (FILE *, const __fpos_t *);
+libc_hidden_proto (_IO_new_fsetpos)
 #   define fsetpos(fp, posp) _IO_new_fsetpos (fp, posp)
 extern int _IO_new_fgetpos (FILE *, __fpos_t *);
+libc_hidden_proto (_IO_new_fgetpos)
 #   define fgetpos(fp, posp) _IO_new_fgetpos (fp, posp)
 #  endif
 
index 114e12d25597767675f0be53d3fb26206029d4a9..13ef64f6ba1699c1998ac06080fedc5c3f5a4e9d 100644 (file)
@@ -96,7 +96,8 @@ extern int __add_to_environ (const char *name, const char *value,
                             const char *combines, int replace)
      attribute_hidden;
 extern void _quicksort (void *const pbase, size_t total_elems,
-                       size_t size, __compar_d_fn_t cmp, void *arg);
+                       size_t size, __compar_d_fn_t cmp, void *arg)
+     attribute_hidden;
 
 extern int __on_exit (void (*__func) (int __status, void *__arg), void *__arg);
 
index bb4922cbbe65dd438059106d2ce69508d201e16e..63639e2e8c729f1e7e795437b2d5b7e5e9e35ced 100644 (file)
@@ -88,6 +88,7 @@ libc_hidden_proto (__stpncpy)
 libc_hidden_proto (__rawmemchr)
 libc_hidden_proto (__strcasecmp)
 libc_hidden_proto (__strcasecmp_l)
+libc_hidden_proto (__strncasecmp)
 libc_hidden_proto (__strncasecmp_l)
 extern __typeof (strncat) __strncat;
 libc_hidden_proto (__strncat)
@@ -95,6 +96,7 @@ libc_hidden_proto (__strdup)
 libc_hidden_proto (__strndup)
 libc_hidden_proto (__strerror_r)
 libc_hidden_proto (__strverscmp)
+libc_hidden_proto (__strchrnul)
 libc_hidden_proto (basename)
 extern char *__basename (const char *__filename) __THROW __nonnull ((1));
 libc_hidden_proto (__basename)
@@ -109,6 +111,7 @@ libc_hidden_proto (__strnlen)
 libc_hidden_proto (memmem)
 extern __typeof (memmem) __memmem;
 libc_hidden_proto (__memmem)
+libc_hidden_proto (__memrchr)
 libc_hidden_proto (__ffs)
 
 #if IS_IN (libc)
index 1db0ac82785f940309ba52768deb276439fa37e9..0f5187650fa96d64c520695f6ef1f245a3f26e41 100644 (file)
@@ -151,9 +151,12 @@ extern int __wcsncasecmp (const wchar_t *__s1, const wchar_t *__s2,
                          size_t __n)
      __attribute_pure__;
 extern size_t __wcslen (const wchar_t *__s) __attribute_pure__;
+libc_hidden_proto (__wcslen)
 extern size_t __wcsnlen (const wchar_t *__s, size_t __maxlen)
      __attribute_pure__;
+libc_hidden_proto (__wcsnlen)
 extern wchar_t *__wcscat (wchar_t *dest, const wchar_t *src);
+libc_hidden_proto (__wcscat)
 extern wint_t __btowc (int __c) attribute_hidden;
 extern int __mbsinit (const __mbstate_t *__ps);
 extern size_t __mbrtowc (wchar_t *__restrict __pwc,
@@ -182,9 +185,11 @@ extern size_t __wcsnrtombs (char *__restrict __dst,
      attribute_hidden;
 extern wchar_t *__wcsncpy (wchar_t *__restrict __dest,
                           const wchar_t *__restrict __src, size_t __n);
+libc_hidden_proto (__wcsncpy)
 extern wchar_t *__wcpcpy (wchar_t *__dest, const wchar_t *__src);
 extern wchar_t *__wcpncpy (wchar_t *__dest, const wchar_t *__src,
                           size_t __n);
+libc_hidden_proto (__wcpncpy)
 extern wchar_t *__wmemcpy (wchar_t *__s1, const wchar_t *s2,
                           size_t __n) attribute_hidden;
 extern wchar_t *__wmempcpy (wchar_t *__restrict __s1,
@@ -194,6 +199,7 @@ extern wchar_t *__wmemmove (wchar_t *__s1, const wchar_t *__s2,
                            size_t __n) attribute_hidden;
 extern wchar_t *__wcschrnul (const wchar_t *__s, wchar_t __wc)
      __attribute_pure__;
+libc_hidden_proto (__wcschrnul)
 
 extern wchar_t *__wmemset_chk (wchar_t *__s, wchar_t __c, size_t __n,
                               size_t __ns) __THROW;
index 5fd3f863ae743e1c6dcb9748331bd72f8f50ade9..5a058991073b38d8ea5a3714ce4336def7d8dfc6 100644 (file)
@@ -16,7 +16,9 @@ libc_hidden_proto (towupper)
 extern int __iswspace (wint_t __wc);
 extern int __iswctype (wint_t __wc, wctype_t __desc);
 extern wctype_t __wctype (const char *__property);
+libc_hidden_proto (__wctype)
 extern wctrans_t __wctrans (const char *__property);
+libc_hidden_proto (__wctrans)
 extern wint_t __towctrans (wint_t __wc, wctrans_t __desc);
 
 extern __typeof (iswalnum) __iswalnum __THROW __attribute_pure__;
index b559a32e77a1af65c21c91797f7ce0571948834a..4a09260ff5707b86419e0ed2c098240cfd7e606b 100644 (file)
@@ -73,7 +73,8 @@ struct loaded_l10nfile
    names.  The return value is dynamically allocated and has to be
    freed by the caller.  */
 extern const char *_nl_normalize_codeset (const char *codeset,
-                                         size_t name_len);
+                                         size_t name_len)
+  attribute_hidden;
 
 /* Lookup a locale dependent file.
    *L10NFILE_LIST denotes a pool of lookup results of locale dependent
@@ -95,13 +96,15 @@ _nl_make_l10nflist (struct loaded_l10nfile **l10nfile_list,
                    const char *language, const char *territory,
                    const char *codeset, const char *normalized_codeset,
                    const char *modifier,
-                   const char *filename, int do_allocate);
+                   const char *filename, int do_allocate)
+  attribute_hidden;
 
 /* Lookup the real locale name for a locale alias NAME, or NULL if
    NAME is not a locale alias (but possibly a real locale name).
    The return value is statically allocated and must not be freed.  */
 /* Part of the libintl ABI only for the sake of the gettext.m4 macro.  */
-extern LIBINTL_DLL_EXPORTED const char *_nl_expand_alias (const char *name);
+extern LIBINTL_DLL_EXPORTED const char *_nl_expand_alias (const char *name)
+  attribute_hidden;
 
 /* Split a locale name NAME into its pieces: language, modifier,
    territory, codeset.
@@ -121,6 +124,7 @@ extern LIBINTL_DLL_EXPORTED const char *_nl_expand_alias (const char *name);
 extern int _nl_explode_name (char *name, const char **language,
                             const char **modifier, const char **territory,
                             const char **codeset,
-                            const char **normalized_codeset);
+                            const char **normalized_codeset)
+  attribute_hidden;
 
 #endif /* loadinfo.h */
index c9c5cbcc3cfded36f54349cefaec0853ad9e719b..f281104bc096c5c0b35baab4de3ac9e29a3aece7 100644 (file)
@@ -396,6 +396,7 @@ _IO_new_file_setbuf (FILE *fp, char *p, ssize_t len)
 
   return fp;
 }
+libc_hidden_def (_IO_new_file_setbuf)
 libc_hidden_ver (_IO_new_file_setbuf, _IO_file_setbuf)
 
 
@@ -432,6 +433,7 @@ _IO_new_do_write (FILE *fp, const char *data, size_t to_do)
   return (to_do == 0
          || (size_t) new_do_write (fp, data, to_do) == to_do) ? 0 : EOF;
 }
+libc_hidden_def (_IO_new_do_write)
 libc_hidden_ver (_IO_new_do_write, _IO_do_write)
 
 static size_t
index 2fec221b99729718d27cef453db2d3e0c2c56233..6a48ed7f0e7726dc459a4a2799621934e165b9df 100644 (file)
@@ -108,9 +108,8 @@ libc_hidden_def (_IO_link_in)
 
 /* Return minimum _pos markers
    Assumes the current get area is the main get area. */
-ssize_t _IO_least_marker (FILE *fp, char *end_p);
 
-ssize_t
+static ssize_t
 _IO_least_marker (FILE *fp, char *end_p)
 {
   ssize_t least_so_far = end_p - fp->_IO_read_base;
index 7a8b89f9f540e7621d42173d2200561123d07d98..259e318c8cd0899aaf4a14cb3c1ebfc4b48974aa 100644 (file)
@@ -79,6 +79,7 @@ _IO_new_fclose (FILE *fp)
 
   return status;
 }
+libc_hidden_def (_IO_new_fclose)
 
 versioned_symbol (libc, _IO_new_fclose, _IO_fclose, GLIBC_2_1);
 strong_alias (_IO_new_fclose, __new_fclose)
index 1f20eacb256e0c24e939b80f5bab7950d967cef1..75d6c072af3d96e124885d598f1384d97b654c84 100644 (file)
@@ -160,6 +160,7 @@ _IO_new_fdopen (int fd, const char *mode)
     }
   return &new_f->fp.file;
 }
+libc_hidden_def (_IO_new_fdopen)
 libc_hidden_ver (_IO_new_fdopen, _IO_fdopen)
 
 strong_alias (_IO_new_fdopen, __new_fdopen)
index 8177326c9c5bdf0a66bc53e0c3b07ae37f68657a..fc7a3c48a5e29c4ce246824d5174cbc781544880 100644 (file)
@@ -79,7 +79,7 @@ _IO_new_fgetpos (FILE *fp, __fpos_t *posp)
   _IO_release_lock (fp);
   return result;
 }
-
+libc_hidden_def (_IO_new_fgetpos)
 strong_alias (_IO_new_fgetpos, __new_fgetpos)
 versioned_symbol (libc, _IO_new_fgetpos, _IO_fgetpos, GLIBC_2_2);
 versioned_symbol (libc, __new_fgetpos, fgetpos, GLIBC_2_2);
index 0ec5413197247c4d63da60fa82a4dc8517cc3762..a552f2d6af548fefa2d9a0d526be1fe5a3edac77 100644 (file)
@@ -62,7 +62,7 @@ _IO_new_fgetpos64 (FILE *fp, __fpos64_t *posp)
   _IO_release_lock (fp);
   return result;
 }
-
+libc_hidden_def (_IO_new_fgetpos64)
 strong_alias (_IO_new_fgetpos64, __new_fgetpos64)
 versioned_symbol (libc, _IO_new_fgetpos64, _IO_fgetpos64, GLIBC_2_2);
 versioned_symbol (libc, __new_fgetpos64, fgetpos64, GLIBC_2_2);
index ed3e8b853c64f4b20032be883e269b28ee51f045..d10849b8e13971916b43f77b8450ac96c2ca054e 100644 (file)
@@ -85,7 +85,7 @@ _IO_new_fopen (const char *filename, const char *mode)
 {
   return __fopen_internal (filename, mode, 1);
 }
-
+libc_hidden_def (_IO_new_fopen)
 strong_alias (_IO_new_fopen, __new_fopen)
 versioned_symbol (libc, _IO_new_fopen, _IO_fopen, GLIBC_2_1);
 versioned_symbol (libc, __new_fopen, fopen, GLIBC_2_1);
index 43a87fe4be9fca0067f71dcd5bcc2add98b6761c..741173758552a3f33230005c111e7886755bd546 100644 (file)
@@ -147,7 +147,7 @@ set_callbacks (cookie_io_functions_t *target,
   *target = source;
 }
 
-void
+static void
 _IO_cookie_init (struct _IO_cookie_file *cfile, int read_write,
                 void *cookie, cookie_io_functions_t io_functions)
 {
@@ -213,7 +213,7 @@ _IO_fopencookie (void *cookie, const char *mode,
 
   return (FILE *) &new_f->cfile.__fp;
 }
-
+libc_hidden_def (_IO_fopencookie)
 versioned_symbol (libc, _IO_fopencookie, fopencookie, GLIBC_2_2);
 
 #if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_2)
index da48b27c3b9baf0806841903a5c5626124f83881..23b04e4a552982b412c2b3b20b04e0e36ca1724e 100644 (file)
@@ -66,7 +66,7 @@ _IO_new_fsetpos (FILE *fp, const __fpos_t *posp)
   _IO_release_lock (fp);
   return result;
 }
-
+libc_hidden_def (_IO_new_fsetpos)
 strong_alias (_IO_new_fsetpos, __new_fsetpos)
 versioned_symbol (libc, _IO_new_fsetpos, _IO_fsetpos, GLIBC_2_2);
 versioned_symbol (libc, __new_fsetpos, fsetpos, GLIBC_2_2);
index 29da981488444e1942fa46e12d2bddd322b08a61..94b0bd73dff83fa6e4d0ffb6b707bda3e71874db 100644 (file)
@@ -56,7 +56,7 @@ _IO_new_fsetpos64 (FILE *fp, const fpos64_t *posp)
   _IO_release_lock (fp);
   return result;
 }
-
+libc_hidden_def (_IO_new_fsetpos64)
 strong_alias (_IO_new_fsetpos64, __new_fsetpos64)
 versioned_symbol (libc, __new_fsetpos64, fsetpos64, GLIBC_2_2);
 versioned_symbol (libc, _IO_new_fsetpos64, _IO_fsetpos64, GLIBC_2_2);
index 69e1c0e699c98309fdf0bb6603a9ca7fcc746da8..6b5b8cf5d07a903caeda9df9c017f0436427bcb6 100644 (file)
@@ -9,11 +9,13 @@
 
 extern int _IO_fclose (FILE*);
 extern int _IO_new_fclose (FILE*);
+libc_hidden_proto (_IO_new_fclose)
 extern int _IO_old_fclose (FILE*);
 extern FILE *_IO_fdopen (int, const char*) __THROW;
 libc_hidden_proto (_IO_fdopen)
 extern FILE *_IO_old_fdopen (int, const char*) __THROW;
 extern FILE *_IO_new_fdopen (int, const char*) __THROW;
+libc_hidden_proto (_IO_new_fdopen)
 extern int _IO_fflush (FILE*);
 libc_hidden_proto (_IO_fflush)
 extern int _IO_fgetpos (FILE*, __fpos_t*);
@@ -22,6 +24,7 @@ extern char* _IO_fgets (char*, int, FILE*);
 extern FILE *_IO_fopen (const char*, const char*);
 extern FILE *_IO_old_fopen (const char*, const char*);
 extern FILE *_IO_new_fopen (const char*, const char*);
+libc_hidden_proto (_IO_new_fopen)
 extern FILE *_IO_fopen64 (const char*, const char*);
 extern FILE *__fopen_internal (const char*, const char*, int)
        attribute_hidden;
@@ -49,7 +52,8 @@ libc_hidden_proto (_IO_setvbuf)
 extern int _IO_sscanf (const char*, const char*, ...) __THROW;
 extern int _IO_sprintf (char *, const char*, ...) __THROW;
 extern int _IO_ungetc (int, FILE*) __THROW;
-extern int _IO_vsscanf (const char *, const char *, __gnuc_va_list) __THROW;
+extern int _IO_vsscanf (const char *, const char *, __gnuc_va_list)
+  __THROW attribute_hidden;
 extern int _IO_vsprintf (char*, const char*, __gnuc_va_list) __THROW;
 libc_hidden_proto (_IO_vsprintf)
 extern int _IO_vswprintf (wchar_t*, size_t, const wchar_t*, __gnuc_va_list)
@@ -57,7 +61,7 @@ extern int _IO_vswprintf (wchar_t*, size_t, const wchar_t*, __gnuc_va_list)
 
 struct obstack;
 extern int _IO_obstack_vprintf (struct obstack *, const char *, __gnuc_va_list)
-       __THROW;
+       __THROW attribute_hidden;
 extern int _IO_obstack_printf (struct obstack *, const char *, ...) __THROW;
 #define _IO_clearerr(FP) ((FP)->_flags &= ~(_IO_ERR_SEEN|_IO_EOF_SEEN))
 #define _IO_fseek(__fp, __offset, __whence) \
index 2eff45b4c80b5cd65c02e1eae0e3befdf4e3d0f5..82c1036000f6a0c5d8fc7361ecdbb5df64b8e73b 100644 (file)
@@ -177,6 +177,7 @@ _IO_new_proc_open (FILE *fp, const char *command, const char *mode)
   _IO_mask_flags (fp, read_or_write, _IO_NO_READS|_IO_NO_WRITES);
   return fp;
 }
+libc_hidden_def (_IO_new_proc_open)
 
 FILE *
 _IO_new_popen (const char *command, const char *mode)
index a35d866d82778563b7b46f11d42dbc16e865bd83..a92a24b50596f29802f03b8b11a06aa5d7830e71 100644 (file)
@@ -49,8 +49,7 @@ _IO_setvbuf (FILE *fp, char *buf, int mode, size_t size)
                 buffering has not been explicitly set".  In both
                 cases, _IO_LINE_BUF is off.  If this is a tty, and
                 _IO_filedoalloc later gets called, it cannot know if
-                it should set the _IO_LINE_BUF flag (because that is
-                the default), or not (because we have explicitly asked
+                it should set the _IO_LINE_BUF flag (because that is            the default), or not (because we have explicitly asked
                 for fully buffered mode).  So we make sure a buffer
                 gets allocated now, and explicitly turn off line
                 buffering.
index 00f9169613eab6e8dcedc12f49c36eab835c460c..ffd692e403550212d9269b65b2cd1be24fd752a6 100644 (file)
@@ -193,10 +193,6 @@ extern FILE *_IO_stderr attribute_hidden;
 
 struct _IO_cookie_file;
 
-/* Initialize one of those.  */
-extern void _IO_cookie_init (struct _IO_cookie_file *__cfile, int __read_write,
-                            void *__cookie, cookie_io_functions_t __fns);
-
 extern int __underflow (FILE *);
 extern wint_t __wunderflow (FILE *);
 extern wint_t __wuflow (FILE *);
@@ -269,7 +265,7 @@ extern void _IO_free_backup_area (FILE *) __THROW;
 
 extern wint_t _IO_getwc (FILE *__fp);
 extern wint_t _IO_putwc (wchar_t __wc, FILE *__fp);
-extern int _IO_fwide (FILE *__fp, int __mode) __THROW;
+extern int _IO_fwide (FILE *__fp, int __mode) __THROW attribute_hidden;
 
 #if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_1)
 #  define _IO_fwide_maybe_incompatible \
@@ -298,10 +294,13 @@ weak_extern (_IO_stdin_used);
      __result; })
 
 extern int _IO_vfwscanf (FILE * __restrict, const wchar_t * __restrict,
-                        __gnuc_va_list, int *__restrict);
+                        __gnuc_va_list, int *__restrict)
+  attribute_hidden;
 extern int _IO_vfwprintf (FILE *__restrict, const wchar_t *__restrict,
-                         __gnuc_va_list);
-extern __ssize_t _IO_wpadn (FILE *, wint_t, __ssize_t);
+                         __gnuc_va_list)
+  attribute_hidden;
+extern __ssize_t _IO_wpadn (FILE *, wint_t, __ssize_t)
+  attribute_hidden;
 extern void _IO_free_wbackup_area (FILE *) __THROW;
 
 #ifdef __LDBL_COMPAT
index 8afe7032e3f6b1d6f0376783a0e22f1fed114c6a..9175b3c8b8748f38618ea90c0f360569c1bf4ecb 100644 (file)
@@ -343,6 +343,7 @@ struct _IO_cookie_file
 
 FILE *_IO_fopencookie (void *cookie, const char *mode,
                        cookie_io_functions_t io_functions);
+libc_hidden_proto (_IO_fopencookie)
 
 
 /* Iterator type for walking global linked list of _IO_FILE objects. */
@@ -351,8 +352,8 @@ typedef FILE *_IO_ITER;
 
 /* Generic functions */
 
-extern void _IO_switch_to_main_get_area (FILE *) __THROW;
-extern void _IO_switch_to_backup_area (FILE *) __THROW;
+extern void _IO_switch_to_main_get_area (FILE *) __THROW attribute_hidden;
+extern void _IO_switch_to_backup_area (FILE *) __THROW attribute_hidden;
 extern int _IO_switch_to_get_mode (FILE *);
 libc_hidden_proto (_IO_switch_to_get_mode)
 extern void _IO_init_internal (FILE *, int) attribute_hidden;
@@ -442,7 +443,7 @@ extern int _IO_default_pbackfail (FILE *, int) __THROW;
 libc_hidden_proto (_IO_default_pbackfail)
 extern wint_t _IO_wdefault_pbackfail (FILE *, wint_t) __THROW;
 libc_hidden_proto (_IO_wdefault_pbackfail)
-extern FILE* _IO_default_setbuf (FILE *, char *, ssize_t);
+extern FILE* _IO_default_setbuf (FILE *, char *, ssize_t) attribute_hidden;
 extern size_t _IO_default_xsputn (FILE *, const void *, size_t);
 libc_hidden_proto (_IO_default_xsputn)
 extern size_t _IO_wdefault_xsputn (FILE *, const void *, size_t);
@@ -480,24 +481,29 @@ extern const struct _IO_codecvt __libio_codecvt attribute_hidden;
 extern int _IO_do_write (FILE *, const char *, size_t);
 libc_hidden_proto (_IO_do_write)
 extern int _IO_new_do_write (FILE *, const char *, size_t);
+libc_hidden_proto (_IO_new_do_write)
 extern int _IO_old_do_write (FILE *, const char *, size_t);
 extern int _IO_wdo_write (FILE *, const wchar_t *, size_t);
 libc_hidden_proto (_IO_wdo_write)
-extern int _IO_flush_all_lockp (int);
+extern int _IO_flush_all_lockp (int) attribute_hidden;
 extern int _IO_flush_all (void);
 libc_hidden_proto (_IO_flush_all)
-extern int _IO_cleanup (void);
+extern int _IO_cleanup (void) attribute_hidden;
 extern void _IO_flush_all_linebuffered (void);
 libc_hidden_proto (_IO_flush_all_linebuffered)
 extern int _IO_new_fgetpos (FILE *, __fpos_t *);
+libc_hidden_proto (_IO_new_fgetpos)
 extern int _IO_old_fgetpos (FILE *, __fpos_t *);
 extern int _IO_new_fsetpos (FILE *, const __fpos_t *);
+libc_hidden_proto (_IO_new_fsetpos)
 extern int _IO_old_fsetpos (FILE *, const __fpos_t *);
 extern int _IO_new_fgetpos64 (FILE *, __fpos64_t *);
+libc_hidden_proto (_IO_new_fgetpos64)
 extern int _IO_old_fgetpos64 (FILE *, __fpos64_t *);
 extern int _IO_new_fsetpos64 (FILE *, const __fpos64_t *);
+libc_hidden_proto (_IO_new_fsetpos64)
 extern int _IO_old_fsetpos64 (FILE *, const __fpos64_t *);
-extern void _IO_old_init (FILE *fp, int flags) __THROW;
+extern void _IO_old_init (FILE *fp, int flags) __THROW attribute_hidden;
 
 
 #define _IO_do_flush(_f) \
@@ -554,8 +560,8 @@ libc_hidden_proto (_IO_file_close)
 extern int _IO_file_close_mmap (FILE *) __THROW;
 extern int _IO_file_underflow (FILE *);
 libc_hidden_proto (_IO_file_underflow)
-extern int _IO_file_underflow_mmap (FILE *);
-extern int _IO_file_underflow_maybe_mmap (FILE *);
+extern int _IO_file_underflow_mmap (FILE *) attribute_hidden;
+extern int _IO_file_underflow_maybe_mmap (FILE *) attribute_hidden;
 extern int _IO_file_overflow (FILE *, int);
 libc_hidden_proto (_IO_file_overflow)
 #define _IO_file_is_open(__fp) ((__fp)->_fileno != -1)
@@ -583,10 +589,12 @@ extern void _IO_new_file_finish (FILE *, int);
 extern FILE* _IO_new_file_fopen (FILE *, const char *, const char *,
                                     int);
 extern void _IO_no_init (FILE *, int, int, struct _IO_wide_data *,
-                        const struct _IO_jump_t *) __THROW;
+                        const struct _IO_jump_t *)
+  __THROW attribute_hidden;
 extern void _IO_new_file_init_internal (struct _IO_FILE_plus *)
   __THROW attribute_hidden;
 extern FILE* _IO_new_file_setbuf (FILE *, char *, ssize_t);
+libc_hidden_proto (_IO_new_file_setbuf)
 extern FILE* _IO_file_setbuf_mmap (FILE *, char *, ssize_t);
 extern int _IO_new_file_sync (FILE *);
 extern int _IO_new_file_underflow (FILE *);
@@ -623,10 +631,10 @@ extern off64_t _IO_wfile_seekoff (FILE *, off64_t, int, int);
 libc_hidden_proto (_IO_wfile_seekoff)
 
 /* Jumptable functions for proc_files. */
-extern FILE* _IO_proc_open (FILE *, const char *, const char *)
-     __THROW;
-extern FILE* _IO_new_proc_open (FILE *, const char *, const char *)
-     __THROW;
+extern FILE* _IO_proc_open (FILE *, const char *, const char *) __THROW;
+libc_hidden_proto (_IO_proc_open)
+extern FILE* _IO_new_proc_open (FILE *, const char *, const char *);
+libc_hidden_proto (_IO_new_proc_open)
 extern FILE* _IO_old_proc_open (FILE *, const char *, const char *);
 extern int _IO_proc_close (FILE *) __THROW;
 extern int _IO_new_proc_close (FILE *) __THROW;
@@ -641,28 +649,30 @@ extern int _IO_str_pbackfail (FILE *, int) __THROW;
 libc_hidden_proto (_IO_str_pbackfail)
 extern off64_t _IO_str_seekoff (FILE *, off64_t, int, int) __THROW;
 libc_hidden_proto (_IO_str_seekoff)
-extern void _IO_str_finish (FILE *, int) __THROW;
+extern void _IO_str_finish (FILE *, int) __THROW attribute_hidden;
 
 /* Other strfile functions */
 struct _IO_strfile_;
-extern ssize_t _IO_str_count (FILE *) __THROW;
+extern ssize_t _IO_str_count (FILE *) __THROW attribute_hidden;
 
 /* And the wide character versions.  */
 extern void _IO_wstr_init_static (FILE *, wchar_t *, size_t, wchar_t *)
-     __THROW;
-extern ssize_t _IO_wstr_count (FILE *) __THROW;
-extern wint_t _IO_wstr_overflow (FILE *, wint_t) __THROW;
+     __THROW attribute_hidden;
+extern ssize_t _IO_wstr_count (FILE *) __THROW attribute_hidden;
+extern wint_t _IO_wstr_overflow (FILE *, wint_t) __THROW attribute_hidden;
 extern wint_t _IO_wstr_underflow (FILE *) __THROW;
 extern off64_t _IO_wstr_seekoff (FILE *, off64_t, int, int)
      __THROW;
 extern wint_t _IO_wstr_pbackfail (FILE *, wint_t) __THROW;
-extern void _IO_wstr_finish (FILE *, int) __THROW;
+extern void _IO_wstr_finish (FILE *, int) __THROW attribute_hidden;
 
-extern int _IO_vasprintf (char **result_ptr, const char *format,
-                         va_list args) __THROW;
-extern int _IO_vdprintf (int d, const char *format, va_list arg);
+extern int _IO_vasprintf (char **result_ptr, const char *format, va_list ap)
+  __THROW attribute_hidden;
+extern int _IO_vdprintf (int d, const char *format, va_list ap)
+  attribute_hidden;
 extern int _IO_vsnprintf (char *string, size_t maxlen,
-                         const char *format, va_list args) __THROW;
+                         const char *format, va_list ap)
+  __THROW attribute_hidden;
 
 
 extern size_t _IO_getline (FILE *,char *, size_t, int, int);
@@ -670,17 +680,21 @@ libc_hidden_proto (_IO_getline)
 extern size_t _IO_getline_info (FILE *,char *, size_t,
                                    int, int, int *);
 libc_hidden_proto (_IO_getline_info)
-extern ssize_t _IO_getdelim (char **, size_t *, int, FILE *);
-extern size_t _IO_getwline (FILE *,wchar_t *, size_t, wint_t, int);
-extern size_t _IO_getwline_info (FILE *,wchar_t *, size_t,
-                                    wint_t, int, wint_t *);
+extern ssize_t _IO_getdelim (char **, size_t *, int, FILE *)
+     attribute_hidden;
+extern size_t _IO_getwline (FILE *, wchar_t *, size_t, wint_t, int)
+     attribute_hidden;
+extern size_t _IO_getwline_info (FILE *, wchar_t *, size_t,
+                                 wint_t, int, wint_t *)
+     attribute_hidden;
 
 extern struct _IO_FILE_plus *_IO_list_all;
 libc_hidden_proto (_IO_list_all)
 extern void (*_IO_cleanup_registration_needed) (void);
 
 extern void _IO_str_init_static_internal (struct _IO_strfile_ *, char *,
-                                         size_t, char *) __THROW;
+                                         size_t, char *)
+     __THROW attribute_hidden;
 extern off64_t _IO_seekoff_unlocked (FILE *, off64_t, int, int)
      attribute_hidden;
 extern off64_t _IO_seekpos_unlocked (FILE *, off64_t, int)
index 96149549758dd424f5c08bed3b7ed1259d5d5664..b57232148f1c90e06454aa026c1e3a379221c80e 100644 (file)
@@ -5005,7 +5005,7 @@ __malloc_stats (void)
       if (ar_ptr == &main_arena)
         break;
     }
-  fprintf (stderr, "Total (incl. mmap):\n");
+  fputs ("Total (incl. mmap):\n", stderr);
   fprintf (stderr, "system bytes     = %10u\n", system_b);
   fprintf (stderr, "in use bytes     = %10u\n", in_use_b);
   fprintf (stderr, "max mmap regions = %10u\n", (unsigned int) mp_.max_n_mmaps);
index 9064f209ec3b24c6b341a31fe8acfe98580a59ba..aa2ec4b7cbe772e79481e9a5c354012fbecefa64 100644 (file)
@@ -38,7 +38,6 @@
 
 #include <libio/iolibio.h>
 #define setvbuf(s, b, f, l) _IO_setvbuf (s, b, f, l)
-#define fwrite(buf, size, count, fp) _IO_fwrite (buf, size, count, fp)
 
 #include <kernel-features.h>
 
@@ -304,7 +303,7 @@ mtrace (void)
           /* Be sure it doesn't malloc its buffer!  */
           malloc_trace_buffer = mtb;
           setvbuf (mallstream, malloc_trace_buffer, _IOFBF, TRACE_BUFFER_SIZE);
-          fprintf (mallstream, "= Start\n");
+          fputs ("= Start\n", mallstream);
           tr_old_free_hook = __free_hook;
           __free_hook = tr_freehook;
           tr_old_malloc_hook = __malloc_hook;
@@ -343,6 +342,6 @@ muntrace (void)
   __realloc_hook = tr_old_realloc_hook;
   __memalign_hook = tr_old_memalign_hook;
 
-  fprintf (f, "= End\n");
+  fputs ("= End\n", f);
   fclose (f);
 }
index 2afadd7b1f060fcdaa0e3ba4ba5961871a227200..aea90d27a73374dee63bfed00a89c86658672aef 100644 (file)
@@ -66,9 +66,10 @@ extern int __matherr (struct exception *__exc);
 
 #ifdef _LIBC
 /* fdlibm kernel function */
-extern double __kernel_standard (double, double, int);
-extern float __kernel_standard_f (float, float, int);
-extern long double __kernel_standard_l (long double, long double, int);
+extern double __kernel_standard (double, double, int) attribute_hidden;
+extern float __kernel_standard_f (float, float, int) attribute_hidden;
+extern long double __kernel_standard_l (long double, long double, int)
+  attribute_hidden;
 
 # include <shlib-compat.h>
 # define LIBM_SVID_COMPAT SHLIB_COMPAT (libm, GLIBC_2_0, GLIBC_2_27)
index 24eb7abce59f300cd5636cb61ea48dab261c6807..9c6c94ddb3c539625f3a8fb12673d1dd9f2357ea 100644 (file)
@@ -59,5 +59,5 @@ M_DECL_FUNC (__casin) (CFLOAT x)
 
   return res;
 }
-
+libm_hidden_def (M_SUF (__casin))
 declare_mgen_alias (__casin, casin)
index 8433ce134de4d32023397d6e69caeb0026040f3d..bf42a820690c508995ba32836faad5ff2996923f 100644 (file)
@@ -67,5 +67,5 @@ M_DECL_FUNC (__casinh) (CFLOAT x)
 
   return res;
 }
-
+libm_hidden_def (M_SUF (__casinh))
 declare_mgen_alias (__casinh, casinh)
index 6840c4819e3272e0e89202666e0a481c6f48d49e..f55324593a0af628318a01602cb7e3060e09fe38 100644 (file)
@@ -133,5 +133,5 @@ M_DECL_FUNC (__ccosh) (CFLOAT x)
 
   return retval;
 }
-
+libm_hidden_def (M_SUF (__ccosh))
 declare_mgen_alias (__ccosh, ccosh);
index e099e42a4c3fce0eac3814d364e8b0fb3cde08c0..586b991a171617f7d1de6f46d1ec45226343cdb0 100644 (file)
@@ -147,4 +147,5 @@ M_DECL_FUNC (__cexp) (CFLOAT x)
 
   return retval;
 }
+libm_hidden_def (M_SUF (__cexp))
 declare_mgen_alias (__cexp, cexp)
index 8aa1f74c8b16669a35ad68d532397d4934e21083..3e7537fd81013d97f1091bdbf28e7dc8bc84d317 100644 (file)
@@ -111,5 +111,5 @@ M_DECL_FUNC (__clog) (CFLOAT x)
 
   return result;
 }
-
+libm_hidden_def (M_SUF (__clog))
 declare_mgen_alias (__clog, clog)
index dcf14c753707f132e4250512fe42a7a7f3399d90..e3ac17e72bca55eb84121c814aa8de527423d84c 100644 (file)
@@ -157,4 +157,5 @@ M_DECL_FUNC (__csqrt) (CFLOAT x)
 
   return res;
 }
+libm_hidden_def (M_SUF (__csqrt))
 declare_mgen_alias (__csqrt, csqrt)
index 3aa56f9f8999c10f9bd5a1922e3ad44457e314af..7dff66ac1c1b34963219b2753e15ff60d61cb041 100644 (file)
@@ -26,7 +26,7 @@ M_SUF (__ldexp) (FLOAT value, int exp)
        if(!isfinite(value)||value==0) __set_errno (ERANGE);
        return value;
 }
-
+libm_hidden_def (M_SUF (__ldexp))
 declare_mgen_alias (__ldexp, ldexp)
 strong_alias (M_SUF (__ldexp), M_SUF (__wrap_scalbn))
 declare_mgen_alias (__wrap_scalbn, scalbn)
index 056590cf564fc1ef5bd06e3c78b2ddb9e7667ef0..f2b5b69fc6ad12d3e5fe16c943d85c7cccb7fb2f 100644 (file)
@@ -41,5 +41,6 @@ __atan2 (double y, double x)
     __set_errno (ERANGE);
   return z;
 }
+libm_hidden_def (__atan2)
 libm_alias_double (__atan2, atan2)
 #endif
index bca55e363afd5e1625cadb389a4378da6f915963..3e55e561f48dcbbfd1f4026b81c3791fc2b227ee 100644 (file)
@@ -34,6 +34,7 @@ M_DECL_FUNC (__atan2) (FLOAT y, FLOAT x)
     __set_errno (ERANGE);
   return z;
 }
+libm_hidden_def (M_SUF (__atan2))
 declare_mgen_alias (__atan2, atan2)
 
 #endif /* __USE_WRAPPER_TEMPLATE.  */
index e8aa3778792c291409613b19991acd9025f68491..aac9d95039e40bfb5253623d7e9a29540fc629e4 100644 (file)
@@ -41,5 +41,6 @@ __atan2f (float y, float x)
     __set_errno (ERANGE);
   return z;
 }
+libm_hidden_def (__atan2f)
 libm_alias_float (__atan2, atan2)
 #endif
index 94a3b48437856cd0339e1b1bcec9f4eae5503095..f0f93939c934d753b2f9d9db50e0964278369b9d 100644 (file)
@@ -41,5 +41,6 @@ __atan2l (long double y, long double x)
     __set_errno (ERANGE);
   return z;
 }
+libm_hidden_def (__atan2l)
 libm_alias_ldouble (__atan2, atan2)
 #endif
index f07039cc51cd1b0abf8694b8e81ab7e2069beb25..80aad58efafbb61c62693b99c35d927c0a7354c1 100644 (file)
@@ -31,5 +31,6 @@ __hypot (double x, double y)
 
        return z;
 }
+libm_hidden_def (__hypot)
 libm_alias_double (__hypot, hypot)
 #endif
index 549e49aa0dd9c2558970c133dd74de3abf567394..3ed0c7600221cbe8a2a5379089356a3d93b53bb3 100644 (file)
@@ -35,6 +35,7 @@ M_DECL_FUNC (__hypot) (FLOAT x, FLOAT y)
     __set_errno (ERANGE);
   return z;
 }
+libm_hidden_def (M_SUF (__hypot))
 declare_mgen_alias (__hypot, hypot)
 
 #endif /* __USE_WRAPPER_TEMPLATE.  */
index 82870ce5512f5ebebc39fc375a901590169802a1..0e6f5bedadc825523b770da1564210289785c879 100644 (file)
@@ -35,5 +35,6 @@ __hypotf(float x, float y)
 
        return z;
 }
+libm_hidden_def (__hypotf)
 libm_alias_float (__hypot, hypot)
 #endif
index db5495103d625e7b266025998ee2c8437e50161f..89f11448bf0955ffb9e84a26b47e4bbfdad3cf66 100644 (file)
@@ -36,5 +36,6 @@ __hypotl(long double x, long double y)
 
        return z;
 }
+libm_hidden_def (__hypotl)
 libm_alias_ldouble (__hypot, hypot)
 #endif
index 3e45f33b9cd737900f0f024f7f77bbcbe8a0e7c8..7d98b2589de25c8335078a698b223d91bdc93a2d 100644 (file)
@@ -35,4 +35,5 @@ M_DECL_FUNC (__ilogb) (FLOAT x)
     }
   return r;
 }
+libm_hidden_def (M_SUF (__ilogb))
 declare_mgen_alias (__ilogb, ilogb)
index 5413b8e8dfd9d184b3ea7ae07627a9fbb94b9893..6c4f4d2e402dabe2bcd53b350ec3572e3a564507 100644 (file)
@@ -44,5 +44,6 @@ __log (double x)
 
   return  __ieee754_log (x);
 }
+libm_hidden_def (__log)
 libm_alias_double (__log, log)
 #endif
index 0515fee6299bdcb0904280d7096d83c431861105..26eef7b2c0ac23e5369d21c2dc85326f8616d078 100644 (file)
@@ -40,6 +40,7 @@ M_DECL_FUNC (__log) (FLOAT x)
     }
   return M_SUF (__ieee754_log) (x);
 }
+libm_hidden_def (M_SUF (__log))
 declare_mgen_alias (__log, log)
 
 #endif /* __USE_WRAPPER_TEMPLATE.  */
index 991251a7c544ba703446cbb16d9e62518b1fd619..ea64aca483e7f5a9a21245a4d90ac6a97b4e1805 100644 (file)
@@ -44,5 +44,6 @@ __logl (long double x)
 
   return  __ieee754_logl (x);
 }
+libm_hidden_def (__logl)
 libm_alias_ldouble (__log, log)
 #endif
index e76a8079aa0a2dd4dc09aba48b6a82aaddd1a584..fe3d95b640b1b8b7381d148b202237108aa61e1a 100644 (file)
@@ -33,5 +33,6 @@ __sqrt (double x)
 
   return __ieee754_sqrt (x);
 }
+libm_hidden_def (__sqrt)
 libm_alias_double (__sqrt, sqrt)
 #endif
index 9c6ac75956ca8abf9448d631fd286b5e2d1deb73..f660de6e76262926b9d007e2ff3383452f740dcb 100644 (file)
@@ -35,6 +35,7 @@ M_DECL_FUNC (__sqrt) (FLOAT x)
     __set_errno (EDOM);
   return M_SUF (__ieee754_sqrt) (x);
 }
+libm_hidden_def (M_SUF (__sqrt))
 declare_mgen_alias (__sqrt, sqrt)
 
 #endif /* __USE_WRAPPER_TEMPLATE.  */
index cad9b4ad77f1707af6c1df5ada82b07537d79dfa..78b1f607457052b8bc23709341c4e76215c58afb 100644 (file)
@@ -33,5 +33,6 @@ __sqrtf (float x)
 
   return __ieee754_sqrtf (x);
 }
+libm_hidden_def (__sqrtf)
 libm_alias_float (__sqrt, sqrt)
 #endif
index 16dda403b77144667e3f76b633f6f9165c8a38d3..a3dd418d5e9d05ee18497098f89b8d156d752476 100644 (file)
@@ -33,5 +33,6 @@ __sqrtl (long double x)
 
   return __ieee754_sqrtl (x);
 }
+libm_hidden_def (__sqrtl)
 libm_alias_ldouble (__sqrt, sqrt)
 #endif
index 502250388d78272cb983e22d1104583a539a4e98..d05de32971802efc9bf9b1a62448a3382bc3f85f 100644 (file)
 #define _GETOPT_INT_H  1
 
 #include <getopt.h>
+#ifndef attribute_hidden
+# define attribute_hidden /* nothing */
+#endif
 
 extern int _getopt_internal (int ___argc, char **___argv,
                             const char *__shortopts,
                             const struct option *__longopts, int *__longind,
-                            int __long_only, int __posixly_correct);
+                            int __long_only, int __posixly_correct)
+  attribute_hidden;
 
 \f
 /* Reentrant versions which can handle parsing multiple argument
@@ -102,17 +106,20 @@ extern int _getopt_internal_r (int ___argc, char **___argv,
                               const char *__shortopts,
                               const struct option *__longopts, int *__longind,
                               int __long_only, struct _getopt_data *__data,
-                              int __posixly_correct);
+                              int __posixly_correct)
+  attribute_hidden;
 
 extern int _getopt_long_r (int ___argc, char **___argv,
                           const char *__shortopts,
                           const struct option *__longopts, int *__longind,
-                          struct _getopt_data *__data);
+                          struct _getopt_data *__data)
+  attribute_hidden;
 
 extern int _getopt_long_only_r (int ___argc, char **___argv,
                                const char *__shortopts,
                                const struct option *__longopts,
                                int *__longind,
-                               struct _getopt_data *__data);
+                               struct _getopt_data *__data)
+  attribute_hidden;
 
 #endif /* getopt_int.h */
index f78b02f90980568c2f0fd7b572396cd1fdd31931..368a5f798e69246f57d1c6b614855caea6949558 100644 (file)
@@ -32,5 +32,6 @@
 
 # include <posix/glob.c>
 
+libc_hidden_def (__glob_lstat_compat)
 compat_symbol (libc, __glob_lstat_compat, glob, GLIBC_2_0);
 #endif
index 8444b2f79e3b2edb09a47cfa03fc4ae469e8a188..ffcb8d81d684da7c0045402b401453603121f29b 100644 (file)
@@ -1162,6 +1162,7 @@ __glob (const char *pattern, int flags, int (*errfunc) (const char *, int),
 }
 #if defined _LIBC && !defined __glob
 versioned_symbol (libc, __glob, glob, GLIBC_2_27);
+libc_hidden_def (__glob)
 libc_hidden_ver (__glob, glob)
 #endif
 
index fe7b3e0bdc648d56c9fb97bdd0f2dd96a83eb5d1..8036d03564b00b7bc5ea9ad4985a7d2ee02c9c85 100644 (file)
@@ -31,6 +31,6 @@
 # define GLOB_NO_LSTAT
 
 # include <posix/glob64.c>
-
+libc_hidden_def (__glob64_lstat_compat)
 compat_symbol (libc, __glob64_lstat_compat, glob64, GLIBC_2_0);
 #endif
index 6285a22fa8517d24d410bd9603d033557b0724b2..d3f2afe90c13e6caf3fe17aa7f86651acf51344c 100644 (file)
@@ -34,8 +34,8 @@
    Otherwise, `glob' returns zero.  */
 int
 GLOB_ATTRIBUTE
-glob64 (const char *pattern, int flags,
-       int (*errfunc) (const char *, int), glob64_t *pglob)
+__glob64 (const char *pattern, int flags,
+          int (*errfunc) (const char *, int), glob64_t *pglob)
 {
   if (pattern == NULL || pglob == NULL || (flags & ~__GLOB_FLAGS) != 0)
     {
@@ -46,6 +46,8 @@ glob64 (const char *pattern, int flags,
   __set_errno (ENOSYS);
   return GLOB_NOSYS;
 }
-libc_hidden_def (glob64)
+libc_hidden_def (__glob64)
+weak_alias (__glob64, glob64)
+libc_hidden_weak (glob64)
 
 stub_warning (glob64)
index 0f72d186c85a44b45504dcfb2125a2384bd2ec35..c9f03fb21da2e9ef3bcb51aa4f6ad1a90f9ea840 100644 (file)
@@ -30,4 +30,5 @@ __glob_pattern_p (const char *pattern, int quote)
 {
   return __glob_pattern_type (pattern, quote) == GLOBPAT_SPECIAL;
 }
+libc_hidden_def (__glob_pattern_p)
 weak_alias (__glob_pattern_p, glob_pattern_p)
index 259378b2be2d5f639531f032dd2d85588a2a49aa..55b73255c1aae8f1cd37f413d36457d1e90bf209 100644 (file)
@@ -91,7 +91,7 @@ static struct hostent *res_gethostbyname2_context (struct resolv_context *,
 static void map_v4v6_address (const char *src, char *dst) __THROW;
 static void map_v4v6_hostent (struct hostent *hp, char **bp, int *len) __THROW;
 
-extern void addrsort (char **, int) __THROW;
+static void addrsort (char **, int) __THROW;
 
 # if PACKETSZ > 65536
 #  define      MAXPACKET       PACKETSZ
@@ -894,7 +894,7 @@ map_v4v6_hostent (struct hostent *hp, char **bpp, int *lenp)
        }
 }
 
-extern void
+static void
 addrsort (char **ap, int num)
 {
        int i, j;
index 49096b1f901971e171ea3fe743449d8c23e269ad..c2e1d75473e96f54861af4d8a43f54d683741952 100644 (file)
@@ -47,8 +47,8 @@ struct hconf
 extern struct hconf _res_hconf;
 
 extern void _res_hconf_init (void) attribute_hidden;
-extern void _res_hconf_trim_domain (char *domain);
-extern void _res_hconf_trim_domains (struct hostent *hp);
-extern void _res_hconf_reorder_addrs (struct hostent *hp);
+extern void _res_hconf_trim_domain (char *domain) attribute_hidden;
+extern void _res_hconf_trim_domains (struct hostent *hp) attribute_hidden;
+extern void _res_hconf_reorder_addrs (struct hostent *hp) attribute_hidden;
 
 #endif /* _RES_HCONF_H_ */
index dde0425a33d2b3d889d668a6ce311347ad8e4436..32f9c54335859104b01f0231c0e3f36c592357c0 100644 (file)
@@ -208,7 +208,7 @@ static int          sock_eq(struct sockaddr_in6 *, struct sockaddr_in6 *);
  * author:
  *     paul vixie, 29may94
  */
-int
+static int
 res_ourserver_p(const res_state statp, const struct sockaddr_in6 *inp)
 {
        int ns;
diff --git a/scripts/check-localplt-2.sh b/scripts/check-localplt-2.sh
new file mode 100755 (executable)
index 0000000..d51b7e7
--- /dev/null
@@ -0,0 +1,171 @@
+#! /bin/sh
+
+# This shell script performs a fine-grained test for unwanted calls
+# through the PLT.  It expects its first command line argument to
+# be a specification of expected results, in the same format that
+# check-localplt.awk uses, and the rest of the arguments to be _pic.a
+# archives which should be checked.  AWK should be set in the
+# environment.
+
+set -e
+if [ -n "$BASH_VERSION" ]; then
+    set -o pipefail
+fi
+
+LC_ALL=C
+export LC_ALL
+
+all_expectations="$(mktemp)"
+unsorted_output="$(mktemp)"
+trap "rm -f '$all_expectations' '$unsorted_output'" 0
+
+# Preprocess the expected PLT calls.
+while [ x"$1" != x-- ]; do
+    grep -Ev '^($|#)' "$1" >> "$all_expectations"
+    shift
+done
+shift
+
+for lib in "$@"; do
+    readelf -WSrs "$lib" | tr -s '     ' ' ' | "${AWK-awk}" '
+BEGIN {
+  # Whitelist of relocation types that are allowed to appear in a text
+  # section, regardless of the name of the symbol.  Since the ELF R_*
+  # constants already contain an architecture label, we can use just
+  # one big whitelist and each architecture will only notice the
+  # values that are relevant to it.
+  #
+  # For most architectures, the relocation types that are OK are those
+  # used for a reference, from within a shared object, to a symbol
+  # that was visible as external, but hidden, when the object file was
+  # compiled.  There are usually at least three, one for functions,
+  # one for ordinary data, and one for thread-local data.
+  #
+  # Please keep this list in alphabetical order.
+
+  ok_relocs["R_X86_64_GOTPC32"] = 1;
+  ok_relocs["R_X86_64_GOTPCREL"] = 1;
+  ok_relocs["R_X86_64_GOTPCRELX"] = 1;
+  ok_relocs["R_X86_64_GOTTPOFF"] = 1;
+  ok_relocs["R_X86_64_PC32"] = 1;
+  ok_relocs["R_X86_64_REX_GOTPCRELX"] = 1;
+
+  # The state machine is reset every time we see a "File:" line, but
+  # set it up here anyway as a backstop.
+  in_section_headers = 0;
+  in_text_relocs = 0;
+  in_symbol_table = 0;
+  delete text_sections;
+}
+$1 == "File:" {
+   fname = $0;
+   sub(/^File: */, "", fname);
+   sub(/\(/, " ", fname);
+   sub(/\)/, "", fname);
+
+   in_section_headers = 0;
+   in_text_relocs = 0;
+   in_symbol_table = 0;
+   delete text_sections;
+   next;
+}
+$0 == "" {
+  in_text_relocs = 0;
+  in_section_headers = 0;
+  in_symbol_table = 0;
+  next;
+}
+
+# We only care about relocations against code, but there may be a lot of
+# code sections with weird names, so we parse the section headers to
+# find them all.  This is trickier than it ought to be because readelf -S
+# output is not precisely space-separated columns.
+# We rely on "readelf -WSrs" to print the section headers first and the
+# relocation entries second.
+$0 == "Section Headers:" { in_section_headers = 1; delete text_sections; next; }
+$0 == "Key to Flags:"    { in_section_headers = 0; next; }
+in_section_headers {
+  if (/ PROGBITS / && / AX / && !/\[Nr\]/) {
+    sub(/^ *\[[ 0-9]*\] */, "");
+    text_sections[$1] = 1;
+  }
+  next;
+}
+
+/^Relocation section '\''/ {
+  section = $3
+  gsub(/'\''/, "", section)
+  sub(/^\.rela?/, "", section)
+  in_text_relocs = (section in text_sections);
+  next;
+}
+
+# Relocation section dumps _are_ space-separated columns, or close enough
+# for what we need.  Print the relocation type and the symbol name for
+# each relocation that addresses a symbol.
+in_text_relocs && $1 ~ /^[0-9a-f]/ && $5 !~ /^\./ && !($3 in ok_relocs) {
+  print fname " " $3 " " $5
+}
+
+# Also print out all of the symbols that are defined by this library.
+# Cross-library references have to go through the PLT regardless.
+/^Symbol table '\''/ {
+  in_symbol_table = 1;
+  next;
+}
+in_symbol_table && $7 != "UND" \
+  && ($5 == "GLOBAL" || $5 == "WEAK") \
+  && ($4 != "NOTYPE" && $4 != "FILE" && $4 != "SECTION") \
+{
+  print fname " _DEFINITION_ " $8
+}
+'
+done | ${AWK-awk} '
+FILENAME != "-" {
+  # Note: unlike check-localplt.awk, this program ignores +/? and relocation
+  # type annotations in the whitelist file.
+  # Comments were already stripped above.
+  library = $1;
+  symbol = $2;
+  sub(/:$/, "", library);
+  sub(/\.so$/, "", library);
+  ok_symbols[library,symbol] = 1;
+}
+FILENAME == "-" {
+  library = $1;
+  symbol = $4;
+  sub(/^.*\//, "", library);
+  sub(/\.so$/, "", library);
+  sub(/\.a$/,  "", library);
+  sub(/_pic$/, "", library);
+  sub(/@.*$/,  "", symbol);
+
+  if ($3 == "_DEFINITION_") {
+    defined_syms[library,symbol] = 1;
+  } else {
+    if (!((library,symbol) in ok_symbols) && !(("*",symbol) in ok_symbols)) {
+      if ((library,symbol) in maybe_bad_syms) {
+        maybe_bad_syms[library,symbol] = maybe_bad_syms[library,symbol] "\n" $0;
+      } else {
+        maybe_bad_syms[library,symbol] = $0;
+      }
+    }
+  }
+}
+END {
+  for (libsym in maybe_bad_syms) {
+    if (libsym in defined_syms) {
+      print maybe_bad_syms[libsym];
+      result = 1;
+    }
+  }
+}
+' "$all_expectations" - > "$unsorted_output"
+
+if [ -s "$unsorted_output" ]; then
+    echo "*** Undesirable relocations:"
+    sed -e 's:^[^ ]*/::' < "$unsorted_output" | sort -u
+    exit 1
+else
+    exit 0
+fi
index 8f6c53aeb47f991c8ce5a503ca0bf73afbd9a064..fc5a67453e36832521148a3a55d9ebf6d5c1801d 100644 (file)
@@ -92,14 +92,14 @@ psiginfo (const siginfo_t *pinfo, const char *s)
          if (pinfo->si_signo - SIGRTMIN < SIGRTMAX - pinfo->si_signo)
            {
              if (pinfo->si_signo == SIGRTMIN)
-               fprintf (fp, "SIGRTMIN (");
+               fputs ("SIGRTMIN (", fp);
              else
                fprintf (fp, "SIGRTMIN+%d (", pinfo->si_signo - SIGRTMIN);
            }
          else
            {
              if (pinfo->si_signo == SIGRTMAX)
-               fprintf (fp, "SIGRTMAX (");
+               fputs ("SIGRTMAX (", fp);
              else
                fprintf (fp, "SIGRTMAX-%d (", SIGRTMAX - pinfo->si_signo);
            }
index 3263268c7ea9a44dcb651843f0749a343b75097f..2407354ae4761ce3e2eacd5217bc9d5275e7f343 100644 (file)
@@ -3056,7 +3056,7 @@ ldbl_weak_alias (__vfwscanf, vfwscanf)
 int
 ___vfscanf (FILE *s, const char *format, va_list argptr)
 {
-  return _IO_vfscanf_internal (s, format, argptr, NULL);
+  return _IO_vfscanf (s, format, argptr, NULL);
 }
 ldbl_strong_alias (_IO_vfscanf_internal, _IO_vfscanf)
 ldbl_hidden_def (_IO_vfscanf_internal, _IO_vfscanf)
index 191b89a229101b0c855aa95194331df7c4af9ccc..23a74ef1eb188c2f14e581549f7216f1feadd15f 100644 (file)
@@ -191,7 +191,6 @@ MEMRCHR
   return 0;
 }
 #ifndef MEMRCHR
-# ifdef weak_alias
+libc_hidden_def (__memrchr)
 weak_alias (__memrchr, memrchr)
-# endif
 #endif
index 5a17602edda5932fc732102f3114b7b1763c0b20..dab53aaeee3c41f457c8aeeccf780001ae8aea6a 100644 (file)
@@ -162,5 +162,5 @@ STRCHRNUL (const char *s, int c_in)
   /* This should never happen.  */
   return NULL;
 }
-
+libc_hidden_def (__strchrnul)
 weak_alias (__strchrnul, strchrnul)
index 2558d2969fc7841e8d6182efb1aaf2a0999fe76c..9f0ee3c6c7f59312d62cf3c7cee659d920b783b1 100644 (file)
@@ -65,5 +65,6 @@ __strncasecmp (const char *s1, const char *s2, size_t n LOCALE_PARAM)
   return result;
 }
 #ifndef __strncasecmp
+libc_hidden_def (__strncasecmp)
 weak_alias (__strncasecmp, strncasecmp)
 #endif
index 249e9c3584f2a563ae56a2f7f8cdf9dc6e4520d4..ae0d2b33ba0844a97763c98c8f59630b78e2bcf8 100644 (file)
@@ -56,7 +56,7 @@
 #include <wchar.h>
 #include <shlib-compat.h>
 
-extern u_long _create_xid (void);
+extern u_long _create_xid (void) attribute_hidden;
 
 #define MCALL_MSG_SIZE 24
 
index c2436e3ebcc8cb289ff8152e06f9e5a7f625392b..cc38f2d7c8f5f7369712ede000ab36850cb00595 100644 (file)
@@ -58,7 +58,7 @@
 #include <inet/net-internal.h>
 #include <shlib-compat.h>
 
-extern u_long _create_xid (void);
+extern u_long _create_xid (void) attribute_hidden;
 
 /*
  * UDP bases client side rpc operations
index 33a02cc8af4c49884a788ee586348ee0ee8942e9..57b2b79c5710b7817ded336f7f1bf795d310924d 100644 (file)
@@ -57,7 +57,7 @@
 #include <wchar.h>
 #include <shlib-compat.h>
 
-extern u_long _create_xid (void);
+extern u_long _create_xid (void) attribute_hidden;
 
 #define MCALL_MSG_SIZE 24
 
index 63e586f50481e9eef6e2ca2e977f85322820771d..ae48cd2bc5402a93b9050ec19dbab10c7803850d 100644 (file)
@@ -22,6 +22,8 @@
 #include <libc-lock.h>
 #include <rpc/rpc.h>
 
+extern unsigned long _create_xid (void) attribute_hidden;
+
 /* The RPC code is not threadsafe, but new code should be threadsafe. */
 
 __libc_lock_define_initialized (static, createxid_lock)
index a4d8b2936bf1f52def7990db96549b16b5ce9b2e..76db3980a33c1cf0941bb82ed774f0479561b947 100644 (file)
@@ -35,7 +35,7 @@
 #include <shlib-compat.h>
 #include "des.h"
 
-extern int _des_crypt (char *, unsigned, struct desparams *);
+extern int _des_crypt (char *, unsigned, struct desparams *) attribute_hidden;
 
 /*
  * Copy 8 bytes
index d1d2edfbc83be81867cf9a3c08d79e2966eb6a13..3b53b2249f28a0c0ce079c98f34ddb2f418e535c 100644 (file)
@@ -372,7 +372,7 @@ static const char shifts2[16] =
 
 static void des_set_key (unsigned char *, unsigned long *);
 static void des_encrypt (unsigned long *, unsigned long *, int);
-int _des_crypt (char *, unsigned, struct desparams *);
+int _des_crypt (char *, unsigned, struct desparams *) attribute_hidden;
 
 static void
 des_set_key (unsigned char *key, unsigned long *schedule)
index 6b142e5441dadbd3f9a75e140698cf7d3ba73e22..c9739285e39508f078a82823a3961f48cbf51b23 100644 (file)
@@ -53,7 +53,7 @@
 
 #define MAX_BROADCAST_SIZE 1400
 
-extern u_long _create_xid (void);
+extern u_long _create_xid (void) attribute_hidden;
 
 static const struct timeval timeout = {3, 0};
 
index e13ace5b7e95f666ad4e7ecf7b223ab6bdeff2c0..51b50db3a2748478d97e8bb73c6a017c7edeb0d2 100644 (file)
@@ -128,4 +128,5 @@ L(tail):
        ret
 
 END(__strchrnul)
+libc_hidden_def (__strchrnul)
 weak_alias (__strchrnul, strchrnul)
index ecb37394fb1d3cd3fb19a2f822e7e7f564814ffe..70550dcfcae903403232b41e8c0926c234b319ab 100644 (file)
@@ -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) \
index 16b4ea373683064616e4045e1118f23af7b91e4d..72f4e3bbf7dccbeabb55e12b60cac0408c5d4b1a 100644 (file)
 #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
index 7cb52d4fee3d6449026f3e8edab006ee14ecc102..8f7d775e6a8c49100fcf0a991e98a9a1e1a44460 100644 (file)
@@ -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
index 5900435af9dd46a8b3b4fecd959b77fc9cb93f76..0d96296902b9102ce8a9a035168c2d9ec0be16dd 100644 (file)
@@ -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)
index 1c0d9caf551d68a8a94e9c839504698229d93cf0..9e839ed39e7982b6f0e8e4daa876d7814f395837 100644 (file)
    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
index 12c3b82e122e129a2ac2ff1e02315ab3e111412f..0f505068058f4cae849ea2f6d2384139fd64c25c 100644 (file)
@@ -30,6 +30,6 @@
 
 libc_ifunc_redirected (__redirect_strncasecmp, __strncasecmp,
                       IFUNC_SELECTOR ());
-
+libc_hidden_def (__strncasecmp)
 weak_alias (__strncasecmp, strncasecmp)
 #endif
index 9f1b238a44ed7265d024f8fa8996afe0498a3460..bc2a6e504770e3198e88e065a829bff558dfd2b4 100644 (file)
    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
index 80a4d2a9ab9da5067529be2aeb64e93b7276fd93..3afe4833c5c91813617896d4cc8fd2386be6922b 100644 (file)
@@ -274,5 +274,5 @@ L(6):       popl %edi               /* restore saved register content */
 
        ret
 END (__strchrnul)
-
+libc_hidden_def (__strchrnul)
 weak_alias (__strchrnul, strchrnul)
index 1e188de4d168dcf4eb6ac5a237fa7bfecaa1a43e..ce503d22fa674af8f046354a32d5cf07ea2f36b8 100644 (file)
@@ -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
index 78287fd1cbeadf176604ee1425a910f7e2ecb5f7..7c8e4e15f8c8c14a86c0a72ebde45ab6a1ee3c0c 100644 (file)
@@ -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)
index 3e136e7ee07375d6b7aeafbfe9cafca5412acd12..e0e05bad5551b1d8a4f960153225f87113e9ca54 100644 (file)
@@ -256,4 +256,5 @@ __expm1 (double x)
     }
   return y;
 }
+libm_hidden_def (__expm1)
 libm_alias_double (__expm1, expm1)
index db13a5793bc53e6941044dc615248a0a0965ffbb..3f5783eddb5d0afc87d51386d41f2458e7550b27 100644 (file)
@@ -51,5 +51,5 @@ __nextup (double x)
   INSERT_WORDS (x, hx, lx);
   return x;
 }
-
+libm_hidden_def (__nextup)
 libm_alias_double (__nextup, nextup)
index e1977ea7e93c32cca5369677f23e68f8f797a9f4..6bcb8de8a54f7b92ee9efd0e1631079c93a4c63f 100644 (file)
@@ -107,4 +107,5 @@ __sincos (double x, double *sinx, double *cosx)
 
   *sinx = *cosx = x / x;
 }
+libm_hidden_def (__sincos)
 libm_alias_double (__sincos, sincos)
index c73434f5f32f5260887b7611b8bb82f49368fc7f..5a60efc8538f09df25ee030d8ef9dd1fee254be5 100644 (file)
@@ -63,4 +63,5 @@ __frexp (double x, int *eptr)
   *eptr = e;
   return x;
 }
+libm_hidden_def (__frexp)
 libm_alias_double (__frexp, frexp)
index 5d1f98e47141096d77fda050000460c5c66743d6..1f9e179981efd1c6bbe197e15ea8d8a3e10ce914 100644 (file)
@@ -60,4 +60,5 @@ __nearbyint(double x)
        libc_fesetenv (&env);
        return t;
 }
+libm_hidden_def (__nearbyint)
 libm_alias_double (__nearbyint, nearbyint)
index 3323621ce320d8ab1de139d2f99195f2807a0b8f..7d6b3ac122bfa66f93abe91074deda795e00874b 100644 (file)
@@ -62,4 +62,5 @@ __round (double x)
   INSERT_WORDS64 (x, i0);
   return x;
 }
+libm_hidden_def (__round)
 libm_alias_double (__round, round)
index 03a4cfd6a55bff76b1fe8b75cced83dac3b9b089..b095b854389ac691b5cb016b733f6f5cee9bfcf6 100644 (file)
@@ -99,4 +99,5 @@ float __atanf(float x)
            return (hx<0)? -z:z;
        }
 }
+libm_hidden_def (__atanf)
 libm_alias_float (__atan, atan)
index f289ec23415044c90494443d0d31fc4bf3379d31..08005572e22ffca7b743d439e0e3135b8816b3a6 100644 (file)
@@ -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
index 6eacf0f5fcd86b131da66ca5b37ad84c7800cdfc..60ff3a0a3c31a92f30cdc658fd9d92dedcc2c1bb 100644 (file)
@@ -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)
index 035897077848498e382e38585fc48afa1788f374..a63be37aefac5ae0cb5d600fe9a6a7680e7927f5 100644 (file)
@@ -128,4 +128,5 @@ __expm1f(float x)
        }
        return y;
 }
+libm_hidden_def (__expm1f)
 libm_alias_float (__expm1, expm1)
index 12aed343a0e7b334017c7c3d72046e77fee89e79..c7e583e1f9264019a91bebf2a2894c95bd2150b4 100644 (file)
@@ -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
index b7403bf0d8f48f895c59180be347f6a1aabfb8c4..d39e9809491de165a6caafa070d9bcf00361428b 100644 (file)
@@ -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)
index a8af8948ec283e410e18b1f320f030f78627d8c8..6a7f5feae38f24ae3d45b033ba67cf57fec1f138 100644 (file)
@@ -57,4 +57,5 @@ __nearbyintf(float x)
        libc_fesetenvf (&env);
        return t;
 }
+libm_hidden_def (__nearbyintf)
 libm_alias_float (__nearbyint, nearbyint)
index 7ba8c0b79defd3e35787cd83eb47cdbf2132476c..8fab441e566416306b1c2f7820b867c4968f8b9b 100644 (file)
@@ -43,5 +43,5 @@ __nextupf (float x)
   SET_FLOAT_WORD (x, hx);
   return x;
 }
-
+libm_hidden_def (__nextupf)
 libm_alias_float (__nextup, nextup)
index db6f260a0bf5d73476f438565222b244aefddb57..71f747a47d70120b505a87b43dcd8222548d8b67 100644 (file)
@@ -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
index 90f991d5c42d7db84bdcdd4bc73144463238c4b2..fa8d0bab49d2e5d1a26ca620e8c9719902bc184d 100644 (file)
@@ -67,4 +67,5 @@ __roundevenf (float x)
   SET_FLOAT_WORD (x, ix);
   return x;
 }
+libm_hidden_def (__roundevenf)
 libm_alias_float (__roundeven, roundeven)
index 7c95125d9c4cd48f3c5386e0dbb91fcd771fc5e3..3c925c08f1d310425920756ee15934d2cc305739 100644 (file)
@@ -61,4 +61,5 @@ __roundf (float x)
   SET_FLOAT_WORD (x, i0);
   return x;
 }
+libm_hidden_def (__roundf)
 libm_alias_float (__round, round)
index 2e1464aeac500b8da90d399ff9b3304f90020907..8d4605f3ebd65f738eeab51090c145d06a772d6d 100644 (file)
@@ -49,6 +49,7 @@ __truncf (float x)
 
   return x;
 }
+libm_hidden_def (__truncf)
 #ifndef __truncf
 libm_alias_float (__trunc, trunc)
 #endif
index e05368df538359574e945d1554d8345c8323472c..6de128201d80c59a785770fc408f60bff956188a 100644 (file)
@@ -250,5 +250,5 @@ __atanl (_Float128 x)
   else
     return u;
 }
-
+libm_hidden_def (__atanl)
 libm_alias_ldouble (__atan, atan)
index e6aba5f2afd23d3732ce35ad99d3d8cd3decbb52..3e68a6cde7475c6bc37a302225d35bb9fd59cfd5 100644 (file)
@@ -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)
index b315abccc51ea6b4e0f88a16e1171355a5d27ba9..6424f6d1f290ccc60607dfe9f25c71d0ad70455f 100644 (file)
@@ -84,4 +84,5 @@ _Float128 __cosl(_Float128 x)
            }
        }
 }
+libm_hidden_def (__cosl)
 libm_alias_ldouble (__cos, cos)
index 88e91c702ddd2f497d75976cabdae4ba33c9c423..39c0b459348df5d23649fbeb87b081f349e90832 100644 (file)
@@ -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)
index f9c5e014f9a0913f3e994d01f93b51f176216de4..6f881618ffe925fa3f15495b7e9e5594a046a30e 100644 (file)
@@ -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)
index bab0779e2324f31fac1361b5123604bee023fe24..d9fca42bb8cd17a2c8becae427f60ba882b4ff9d 100644 (file)
@@ -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)
index 04b657d451481d51289c40a50f891becf3474728..e7f617175d3d9daff40c265ca1478d63757adc1a 100644 (file)
@@ -65,4 +65,5 @@ _Float128 __nearbyintl(_Float128 x)
        fesetenv (&env);
        return t;
 }
+libm_hidden_def (__nearbyintl)
 libm_alias_ldouble (__nearbyint, nearbyint)
index 5628c176809325ae7fcb3cda202875dec9fbaf4e..5b40e6e91dc67c95c3cb042a4c53f1205470c504 100644 (file)
@@ -53,5 +53,5 @@ __nextupl (_Float128 x)
   SET_LDOUBLE_WORDS64 (x, hx, lx);
   return x;
 }
-
+libm_hidden_def (__nextupl)
 libm_alias_ldouble (__nextup, nextup)
index 9e6637a22536084a83296fb9a37f5804a0428f02..4632adfeee4210a10d77d040fcd53c589b983c4c 100644 (file)
@@ -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)
index 5fc59af4ee8039727c0f47a02577423a1e0eba26..12f4694b3f292fab2703f7af27b0f5a451f9d108 100644 (file)
@@ -101,4 +101,5 @@ __roundevenl (_Float128 x)
   SET_LDOUBLE_WORDS64 (x, hx, lx);
   return x;
 }
+libm_hidden_def (__roundevenl)
 libm_alias_ldouble (__roundeven, roundeven)
index 22789cedf336f937b517ef4b455011456407b319..8d3e0b8713669df615b945013f68572bb57cad04 100644 (file)
@@ -78,4 +78,5 @@ __roundl (_Float128 x)
   SET_LDOUBLE_WORDS64 (x, i0, i1);
   return x;
 }
+libm_hidden_def (__roundl)
 libm_alias_ldouble (__round, round)
index dfcb0be301f12aafbe16c00613950b22d90e5cf4..12718d6a62186562ce74b100b730a5e173b3f2b4 100644 (file)
@@ -71,4 +71,5 @@ __sincosl (_Float128 x, _Float128 *sinx, _Float128 *cosx)
        }
     }
 }
+libm_hidden_def (__sincosl)
 libm_alias_ldouble (__sincos, sincos)
index 773b2fa7ee38c22836a3c48d4bd6889405028d51..9736a09ad120f6f37f23c958ec409fba6f082a5e 100644 (file)
@@ -84,4 +84,5 @@ _Float128 __sinl(_Float128 x)
            }
        }
 }
+libm_hidden_def (__sinl)
 libm_alias_ldouble (__sin, sin)
index f858ede3d259b758f273c3bc21327dc5a2101547..28d3c45876da6ef4717a6d415b0b274995ec6bf9 100644 (file)
@@ -54,4 +54,5 @@ __truncl (_Float128 x)
 
   return x;
 }
+libm_hidden_def (__truncl)
 libm_alias_ldouble (__trunc, trunc)
index 324e5b9663fa77ffb219fcdbcc061ebaae2e56c9..e56000e8ef4e8ff51d535ed26ad82aecf595ec03 100644 (file)
@@ -86,4 +86,5 @@ long double __cosl(long double x)
            }
        }
 }
+libm_hidden_def (__cosl)
 libm_alias_ldouble (__cos, cos)
index 0f8974085b57daa7286415187982623ffd1b187f..7ecadccae8172f4c3a98c4051b1f997cdd9e90c5 100644 (file)
@@ -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)
index 7c31ed9936cefa80cc5d23264bd298f70d7949f8..98757f169bb0c80856bb4ae77306bd5cec8593ad 100644 (file)
@@ -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)
index a1ca1fecee0e3d4122c675a23fe28b26104536b9..13ade2d6a54ce9523a3aad331246a8ceabd03b49 100644 (file)
@@ -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)
index be2e4fa49eeee3c08ca1bb7a9fefe5d55ec664ec..f00600c981c6c74c89f86785d2ad074948525834 100644 (file)
@@ -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)
index c5c304cb2eea9bf65485d78c4b45d392032a1fe4..4924b44b1453d856a51843c01a4224547158f1a0 100644 (file)
@@ -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)
index 19953c180a11e4491b23d18aa8008efe8300d1ae..e86d3dc61bd70de5e73da96c48fad411b31ae612 100644 (file)
@@ -24,3 +24,6 @@ __signbitl (long double x)
 {
   return __builtin_signbitl (x);
 }
+#if IS_IN (libc) || IS_IN (libm)
+hidden_def (__signbitl)
+#endif
index 355c25dba9b2abc539e83c33a71155715c8a625e..0648b2f31b0aa4dbc9f32639ea7bff7587afd712 100644 (file)
@@ -74,4 +74,5 @@ __sincosl (long double x, long double *sinx, long double *cosx)
        }
     }
 }
+libm_hidden_def (__sincosl)
 libm_alias_ldouble (__sincos, sincos)
index cfbe9bf153f6b2ae10419781352f0d99cab4507e..01cdd0e3b53614f533eb0ba1cd1ea24c424c914c 100644 (file)
@@ -86,4 +86,5 @@ long double __sinl(long double x)
            }
        }
 }
+libm_hidden_def (__sinl)
 libm_alias_ldouble (__sin, sin)
index ea157555c1f5ce9041c65c50822f53c26b5859ab..8dc25e7e131323e6a9a9862a6da032001f4fd777 100644 (file)
@@ -263,5 +263,5 @@ L(L9:)
        cfi_restore (R(d2))
        rts
 END(__strchrnul)
-
+libc_hidden_def (__strchrnul)
 weak_alias (__strchrnul, strchrnul)
index a184b725866cf475ffaacf532865ffe8a64cd309..2dd3857054d6dee906bb6b11e1a604ead91ed0b8 100644 (file)
@@ -42,4 +42,5 @@ __dirfd (DIR *dirp)
   return fd;
 }
 
+libc_hidden_def (__dirfd)
 weak_alias (__dirfd, dirfd)
index e09a45d7172453c000b8a6f9af92757e5377907d..c140da28ecb19e3ccd044dea4816cc8e8474f7a6 100644 (file)
@@ -26,5 +26,5 @@ __dirfd (DIR *dirp)
 {
   return dirp->fd;
 }
-
+libc_hidden_def (__dirfd)
 weak_alias (__dirfd, dirfd)
index 46e20df35004226c4ab3ada9e86137db1153ca83..b1d493852ad3fedf784603090b8aa07a7889d048 100644 (file)
@@ -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>
index 527160f7eb9c4ce741f4a348515177aa76e48737..83635e8e8cb0a12af177f2ec03081ec6d5e627c2 100644 (file)
@@ -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>
index aedae959144ef8d2a61ed8d6ad6f9bdc8680328a..31d6c51c48e21717efaba09b9b52e965247ac8b2 100644 (file)
@@ -194,3 +194,4 @@ L(loop_small):
 END (__memrchr)
 weak_alias (__memrchr, memrchr)
 libc_hidden_builtin_def (memrchr)
+libc_hidden_builtin_def (__memrchr)
index 48be9515e41dcea9fb7e72c353e35aae4daf4208..973c80098137f05aaba7904894dc6aa159fb085b 100644 (file)
@@ -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>
index ead31f791c8549f9c9ec9a61d64ee12abdb0c642..fe6aeb4a8bcfbf5a5e43f5cd95e1e6fa1443ed23 100644 (file)
@@ -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>
index 583d513c4c6503d34dd0695a599f5389e55e4e29..ea88825d07f1e81b3cc7de5a793151f051c29ec0 100644 (file)
@@ -199,3 +199,4 @@ L(loop_small):
 END (MEMRCHR)
 weak_alias (__memrchr, memrchr)
 libc_hidden_builtin_def (memrchr)
+libc_hidden_builtin_def (__memrchr)
index 54de6566bd0d0fa041b9d468d279d1fd0c4a9a05..21a6a70cef62e0f358e68ab8c2a0c62e1bff6887 100644 (file)
@@ -343,3 +343,4 @@ L(loop_small):
 END (MEMRCHR)
 weak_alias (__memrchr, memrchr)
 libc_hidden_builtin_def (memrchr)
+libc_hidden_builtin_def (__memrchr)
index c5e28d9c9e365da9e8ab05010bb3284b796ae760..df7fa88a2759e8ee3d53a3230b7b1849c2acae97 100644 (file)
@@ -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
index 43a44abcf6cc3bdcbeb5af97042cf96fbac42af5..4307a1ad32bfb9e7a5f21e822e2ebf6a1c90f6f5 100644 (file)
@@ -21,6 +21,7 @@
 # include <ifunc-resolve.h>
 
 s390_vx_libc_ifunc (__memrchr)
+libc_hidden_def (__memrchr)
 weak_alias (__memrchr, memrchr)
 
 #else
index 62dfc6bd90638b602c8fb2fae5489c9492733c2a..35e9c5d6d0e168ce34d48c36cf5e4654afd411fc 100644 (file)
@@ -21,6 +21,7 @@
 # include <ifunc-resolve.h>
 
 s390_vx_libc_ifunc (__strchrnul)
+libc_hidden_def (__strchrnul)
 weak_alias (__strchrnul, strchrnul)
 
 #else
index 3a1d1a32c9a997490c9a7f6fee1ef60dc9c2b429..ad767728e5a61805946b69d744705bfe54a6b81e 100644 (file)
@@ -21,6 +21,7 @@
 # include <ifunc-resolve.h>
 
 s390_vx_libc_ifunc (__wcslen)
+libc_hidden_def (__wcslen)
 weak_alias (__wcslen, wcslen)
 
 #else
index 5234074b1fce8ca1bf993e5fe98a13331c8c7124..025e8d537d2d4cf4d82d4cd48f47c7fe7fabe534 100644 (file)
@@ -21,6 +21,7 @@
 # include <ifunc-resolve.h>
 
 s390_vx_libc_ifunc (__wcsnlen)
+libc_hidden_def (__wcsnlen)
 weak_alias (__wcsnlen, wcsnlen)
 
 #else
index 2f425a2ff39b95daae85adb2a2f595f349e75eb5..6c76ecb89b42e4dbb8ca6a60eca1667fc483b0ba 100644 (file)
@@ -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)
index 87997e029f51d28e782ddb887d7b236c22fca7eb..fcf3a51fc1bd33c9350c9d3f7062980f2e6dff04 100644 (file)
@@ -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)
index 1c8bea55e0df8348687915a1e4ac1e353ee22480..d64272c6bba8ac9dff7aef4036c4b789ca1bac74 100644 (file)
@@ -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)
index 64dab9af52e792aab9ccb4f6323175179682e1cc..e5a534027f6fedf70db395fb4dc797c037464842 100644 (file)
 #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
 
 #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)
index 4475e0091cc00b9cb460468d2f78ce002abd225b..66334e7009a45ae9fd7807a3955c6cb1b90aa403 100644 (file)
@@ -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>
 
 # 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 */
index 56f4138c4327e8508cd1db1dc4311c04b528f868..bd39441d3cbd574a75ee64a0bbf43ba3c43165ce 100644 (file)
@@ -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:
index 87997e029f51d28e782ddb887d7b236c22fca7eb..fcf3a51fc1bd33c9350c9d3f7062980f2e6dff04 100644 (file)
@@ -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)
index 92241bbf97d549b1e5a20dfe7e0e862b4675db00..2f14095a17e16825426d91a5e02f8f51101dee2e 100644 (file)
@@ -9,5 +9,6 @@ PSEUDO (__umount2, umount2, 2)
 #endif
        ret
 PSEUDO_END(__umount2)
+libc_hidden_def (__umount2)
 weak_alias (__umount2, umount2)
 #endif
index ba4f0b39dab37d5046f7599b59e09af5358f87df..21dc48de24452cb5645018bfa44800f0a4a3f045 100644 (file)
@@ -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
index b96b2b49d31d0fe8a2f24fd31d8f09d710b65785..2676b22fe73f6508bc48dcccf7f6afeddcde386d 100644 (file)
@@ -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);
 
 
index f0fc3a4a784e3587f0a71226c4a7b1f053f4dbd7..1c291ff22f01cc2faade78232c41e87dbd31de40 100644 (file)
@@ -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);
 
 
index b027f56df3cddc55724969c552101546d74426dc..46b8f6eb35855458b05e1a8b890f7d42cef00e0b 100644 (file)
@@ -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);
 
index 7730bc94479d7eb5d4dec98a0c99b844df4153fb..7e8ec053e999e4357d12dfd4ef2f31b6ac2bb430 100644 (file)
@@ -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);
 
 
index 26178a802044832a8ac34d69ea5b88577049ec57..489580e318439b419d7bc152ecdfc44197be73ed 100644 (file)
@@ -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);
 
 
index 9030774776886a18e20caef962b1d3c6f072f3ee..235fe1c105e0dacd400640d590c299a4f7118daf 100644 (file)
@@ -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 (file)
index 0000000..7f8e42a
--- /dev/null
@@ -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
index 3d2483b0bf4f6ca38a42eb5d4e802a77cdd2227f..355e592f0fce25308ff6a3ced37a708a8670c0aa 100644 (file)
 
 #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 */
index b22a5767be5eebb66aa6c5b573a8db105878a432..bbd019b528948e5313d60a36f08b499748ea3871 100644 (file)
@@ -1,3 +1,5 @@
+#include <math.h>
+
 #define __ieee754_log __ieee754_log_avx
 #define SECTION __attribute__ ((section (".text.avx")))
 
index bce0ee03c24018baa9cc6eb82e92fd3da3f507dc..4e9fbb89906dce6f958c68e6b6386d9240c018a1 100644 (file)
@@ -1,3 +1,5 @@
+#include <math.h>
+
 #define __ieee754_log __ieee754_log_fma
 #define SECTION __attribute__ ((section (".text.fma")))
 
index f458f9c23c3f7ee4da2bae314e2b7e1e6141e03a..18fb2403a0010d93eef3faa0716a48f62e6da426 100644 (file)
@@ -1,3 +1,5 @@
+#include <math.h>
+
 #define __ieee754_log __ieee754_log_fma4
 #define SECTION __attribute__ ((section (".text.fma4")))
 
index a47fd8195ff3be8877da7dfdb0c125087718a2d1..445c0e851e574c4a7c244b8b03f5456ea2c6f234 100644 (file)
@@ -1,3 +1,5 @@
+#include <math.h>
+
 #define __logf __logf_fma
 
 #include <sysdeps/ieee754/flt-32/e_logf.c>
index a185006f40fb8816adcabcfda199b936f52e6e95..4caad1a50dd4d0c9e13f21770028d61dc91ac432 100644 (file)
    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"
index 41816bfe6c4918ea9ccc4e8cff6dbaa23199dfad..b8a4e0877a23b408771449f61efd119150d3eeaf 100644 (file)
@@ -1,3 +1,5 @@
+#include <math.h>
+
 #define __atan __atan_avx
 #define __add __add_avx
 #define __dbl_mp __dbl_mp_avx
index 363e32bcbdbf2126eb702ee51ec4a63b8a8e414f..63d2728bed3c6ffa2bca17a393a98a2a652cb01e 100644 (file)
@@ -1,3 +1,5 @@
+#include <math.h>
+
 #define __atan __atan_fma
 #define __add __add_fma
 #define __dbl_mp __dbl_mp_fma
index ad8d3af579f8dd6eb93af3e4cbe6a3650d4da65b..ebf49e33338a462d08e7a0f4399457a1bc490c13 100644 (file)
@@ -1,3 +1,5 @@
+#include <math.h>
+
 #define __atan __atan_fma4
 #define __add __add_fma4
 #define __dbl_mp __dbl_mp_fma4
index f9ce8549ab5aa2a2eae9cf379d337178ab31fa79..20a95da859d54408abe22f4ebcd2ecc89aecb8f9 100644 (file)
@@ -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
index 6a5ea3ff27124b9749d3a3a38f6c6da73fdd3b6d..094f946d415e89e4a2845221a4124689dd74b9e3 100644 (file)
@@ -1,2 +1,3 @@
+#include <math.h>
 #define __ceil __ceil_c
 #include <sysdeps/ieee754/dbl-64/wordsize-64/s_ceil.c>
index 070fcdddeaa186bd6ce635b8288b14b66f5304c3..99bf8cc30116d3062134a62d479bbcbe0a06a77b 100644 (file)
    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)
index db0c6c4bc30711ad9c1609c64cbb873ad825552a..b35af7bf0bec8bb2239352b228d968032588d4c7 100644 (file)
    <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)
index 33959d3d0169b732317d6208d8e440c1c4e7d510..ef93242b756691a902078ebf8443f9b55fb131dc 100644 (file)
    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)
index 68733b69ef8ad0fda4247af4bb4ebbffab920b22..8a1b5eb7a2d7a1636881136c072b7396193627b4 100644 (file)
@@ -1,3 +1,4 @@
+#include <math.h>
 #undef __floor
 #define __floor __floor_c
 #include <sysdeps/ieee754/dbl-64/wordsize-64/s_floor.c>
index 58f8ed8eaf12d8f0444c17c518039dc14f0923d4..cbcab2d4195b83bd732aa2644388b88e3a20122e 100644 (file)
    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)
index 5ef2fec2e395f878e7bdab720d2bcbd8a8f88cf9..c73a3c0fc6715554c11240285885843a16312922 100644 (file)
    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)
index f897a2a6a613d4bc5d2a0c5739b909b910cae060..35b36ef1026b85e083b40cd64a9c0ceeb15e1034 100644 (file)
@@ -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>
index d92945fd14757ef1bcf24dbf15a12c7e71c1b68f..d55bd0ec2932f5a440ead69c29fc081d01bb87b2 100644 (file)
    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)
index ba7be27956cd4f79632645443f14829f9a66a4ea..1524633ac2ce66f354917722d695dfea43799aa7 100644 (file)
    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)
index 162a630ff9afd45b69d30c9ca20de5d6ba3cc77b..7a0757ae7a7cd72b5f711c2949fb3dfba62e4d79 100644 (file)
@@ -1,3 +1,4 @@
+#include <math.h>
 #undef __rint
 #define __rint __rint_c
 #include <sysdeps/ieee754/dbl-64/wordsize-64/s_rint.c>
index f1cb2fed0c0173cf79b78d8cb5d9a4a11183fe19..2e96907affe9bb7e21bf4ccad1fdd66d27d50c7c 100644 (file)
    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)
index 41323b3b5b3bcbdb9f284c3b2c2b6231c9df18b9..011c7effa0c1b03e1e69b7ecb7493f8e02149a4e 100644 (file)
    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)
index e1c6de02592882e1552b4e6d460515d2db76b012..1ad90c0878c7a32dd8fc62ba3f55ef4dc9da0b24 100644 (file)
@@ -1,3 +1,5 @@
+#include <math.h>
+
 #define __cos __cos_avx
 #define __sin __sin_avx
 #define SECTION __attribute__ ((section (".text.avx")))
index 15f3c394d5c0a3a96c5fd12d45c2699f8409e0eb..5768f95ac0b913548168f955a940187bee819098 100644 (file)
@@ -1,3 +1,5 @@
+#include <math.h>
+
 #define __cos __cos_fma
 #define __sin __sin_fma
 #define __docos __docos_fma
index 4c35739dc9b5287958dbc427595c812cbe112064..dc131ef11dc0aea1a541bc0057da892c88e9311a 100644 (file)
@@ -1,3 +1,5 @@
+#include <math.h>
+
 #define __cos __cos_fma4
 #define __sin __sin_fma4
 #define __docos __docos_fma4
index b289269240e62dc148cd0663617dc0599cdf2fd6..09209b209a15b389d0aff2a9dd55103cd92da517 100644 (file)
@@ -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
index 6cb4295558c0f0bb41b947dc0c0c2c6667df3ee3..ab4b1503f77efb9c6a85a5f56d1ea2e0a2f5a4fc 100644 (file)
    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)
index 4fdfbd8d3ea5e6b10a453504a9cefc0c3bf55836..705a6a68f4fbc4e80cd742f14119feef405291d6 100644 (file)
    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)
index 6204ae3c776bf2ea487c45df6ff796fcbdf876ec..e28a328df79d6a8c816ad94f1df7afcf84d0a598 100644 (file)
@@ -1,2 +1,3 @@
+#include <math.h>
 #define __trunc __trunc_c
 #include <sysdeps/ieee754/dbl-64/wordsize-64/s_trunc.c>
index a1b0c606303a0cdbd7e03812ca357f4f27b110b7..7cb576a1a4deca2b6d8346aa966b997492814cd8 100644 (file)
    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)
index a7e220bd0c0a2f5cc458f68180326b812a1fac43..0bd7e6ce069ca600f84e3df700b784357f3926b2 100644 (file)
    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)
index 8f2bd351f6af673e29c6c845b13ac70789f09449..981190ea4cfb7d42ce07f01d52ef4d4d49a2877c 100644 (file)
@@ -34,4 +34,5 @@ ENTRY(__ceill)
 
        ret
 END (__ceill)
+libm_hidden_def (__ceill)
 libm_alias_ldouble (__ceil, ceil)
index 75f82556488512f1bc8426bb16e2902f0c976451..6fd367dd8219d85134e0115f7ecd89daf34448f5 100644 (file)
@@ -33,4 +33,5 @@ ENTRY(__floorl)
 
        ret
 END (__floorl)
+libm_hidden_def (__floorl)
 libm_alias_ldouble (__floor, floor)
index 947e5e45521e507df03a6980d17d9959aa97989f..e263afb02d037e43e7ef6f444a3869ebaa000698 100644 (file)
@@ -72,3 +72,4 @@ ENTRY(__log1pl)
        ret
 
 END (__log1pl)
+libm_hidden_def (__log1pl)
index 6c7683c32b128dc3aae93fca5e00ea9037c78b05..fb40ce54dd30e87a7b784cb5e498ec0f4a3c2ff8 100644 (file)
@@ -15,3 +15,6 @@ ENTRY(__scalbnl)
        fstp    %st(1)
        ret
 END (__scalbnl)
+#if IS_IN (libc) || IS_IN (libm)
+hidden_def (__scalbnl)
+#endif
index 2086e8ca5c02970391927bee23cfb1c09b129923..6a6ecb71779c362cc9d80f344e02cddfa8ecef3e 100644 (file)
@@ -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
index 22427ece00d3f373b44c42322a699dcd24164584..89c036318d11b3c5afe65c5a80a9a88b70ec7bf1 100644 (file)
@@ -34,4 +34,5 @@ ENTRY(__truncl)
        fldenv  -28(%rsp)
        ret
 END(__truncl)
+libm_hidden_def (__truncl)
 libm_alias_ldouble (__trunc, trunc)
index b8e3fa1d87fcc7895438894022cf6b2cf72d90e6..bde2e4f7abcce5e3232439aa67a0a52b1cbe0a9e 100644 (file)
@@ -377,4 +377,5 @@ L(length_less16_part2_return):
        ret
 
 END (__memrchr)
+libc_hidden_def (__memrchr)
 weak_alias (__memrchr, memrchr)
index d227fe7819a4438772dfcf4962293ff311fc824b..82d585218f20ac12dfbdb22d60a0315522aa6003 100644 (file)
    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
index 75149993413cfd068699a7ae2c757b4ba6c8f276..a2c4155c649f6fbc23c635238a164a1acc934f7b 100644 (file)
    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
index 798966cf3e7063e0828f9fe8a27f1cfd6320394f..fb31961267e0ba872f80ee33aeb374ee79825a1b 100644 (file)
    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
index 6d06e47cbd6022479f6bf656e9f50e21430df832..cdf9aecf0fac262c5e23f663f319aeaf4c5600ea 100644 (file)
    <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
index bd376057e3e26ed618bdeb656ee49ce8cd46177f..efe16e3c748fbff61b75f197bfb71fec38eeb218 100644 (file)
    <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
index 149f3a9cedf85659cb87e41866db5cf4a9edd407..5f11f592a7a0ea6022ff6e1edca78046b919b683 100644 (file)
@@ -24,4 +24,5 @@
 #define AS_STRCHRNUL
 #include "strchr.S"
 
+libc_hidden_def (__strchrnul)
 weak_alias (__strchrnul, strchrnul)
index 9f5f723227d4cfa57c802a72488233e9b2761283..f84cbed19811f81375e5828b393035b09ed8f0fe 100644 (file)
@@ -234,5 +234,5 @@ L(exit_tail7):
        ret
 
 END (__wcslen)
-
+libc_hidden_def (__wcslen)
 weak_alias(__wcslen, wcslen)
index e633faf79798f0ed058d6158ca994fce7811d1dd..35143ee53715e1465042ffc3807e4bc7f34d4a0d 100644 (file)
@@ -83,5 +83,6 @@ __wcpncpy (wchar_t *dest, const wchar_t *src, size_t n)
 }
 
 #ifndef WCPNCPY
+libc_hidden_def (__wcpncpy)
 weak_alias (__wcpncpy, wcpncpy)
 #endif
index 5fe4e02adc47670daa1254fc1dddb4e29e0acdb4..31f5a7915ed02e30fc8d8e703e4053a684882c4d 100644 (file)
@@ -49,5 +49,6 @@ __wcscat (wchar_t *dest, const wchar_t *src)
   return dest;
 }
 #ifndef WCSCAT
+libc_hidden_def (__wcscat)
 weak_alias (__wcscat, wcscat)
 #endif
index af35da8ae30a942552818b57e1ba05c07364d18c..90fe54d24de43041ae88a168d628b8058c8d6c05 100644 (file)
@@ -34,5 +34,6 @@ __wcschrnul (const wchar_t *wcs, const wchar_t wc)
   return (wchar_t *) wcs;
 }
 #ifndef WCSCHRNUL
+libc_hidden_def (__wcschrnul)
 weak_alias (__wcschrnul, wcschrnul)
 #endif
index cfb076e46953cf3ec58530a5d8c66ffc3696aed7..1a2a99da0d5a952f1ad53446e81ed47b310e6906 100644 (file)
@@ -42,5 +42,6 @@ __wcslen (const wchar_t *s)
   return len;
 }
 #ifndef WCSLEN
+libc_hidden_def (__wcslen)
 weak_alias (__wcslen, wcslen)
 #endif
index e9735854d2bd4282a3317e4e76a50d64f43266a6..c723dbb3906a300e11b6fc2570c7df533e4d0fad 100644 (file)
@@ -84,5 +84,6 @@ __wcsncpy (wchar_t *dest, const wchar_t *src, size_t n)
   return s;
 }
 #ifndef WCSNCPY
+libc_hidden_def (__wcsncpy)
 weak_alias (__wcsncpy, wcsncpy)
 #endif
index d8f60a3b5ab0fa45383cc9bf286aa78ce662839a..2af8460a52c8bd68dca6e679a425540d18ffc44b 100644 (file)
@@ -46,5 +46,6 @@ __wcsnlen (const wchar_t *s, size_t maxlen)
   return len;
 }
 #ifndef WCSNLEN
+libc_hidden_def (__wcsnlen)
 weak_alias (__wcsnlen, wcsnlen)
 #endif
index 8396655a522cf5643aa1b1fe24e599fe1c53e451..67a8592cb5159204b1865df11da3321c52c9b374 100644 (file)
@@ -45,4 +45,5 @@ __wctrans (const char *property)
   i = _NL_CURRENT_WORD (LC_CTYPE, _NL_CTYPE_MAP_OFFSET) + cnt;
   return (wctrans_t) _NL_CURRENT_DATA (LC_CTYPE)->values[i].string;
 }
+libc_hidden_def (__wctrans)
 weak_alias (__wctrans, wctrans)
index 8db169a932f0ded3e34e5e756f55fa6dd7fde043..83fcbc6f83954393cfb41eb9bc496a6c8f9fc61d 100644 (file)
@@ -45,4 +45,5 @@ __wctype (const char *property)
   i = _NL_CURRENT_WORD (LC_CTYPE, _NL_CTYPE_CLASS_OFFSET) + result;
   return (wctype_t) _NL_CURRENT_DATA (LC_CTYPE)->values[i].string;
 }
+libc_hidden_def (__wctype)
 weak_alias (__wctype, wctype)