#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
/* 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 */
/* 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
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
{
/* 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
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
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 */
/* 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 *
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) */
};
};
+#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.
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 */
/* 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 *
};
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) */
};
};
+#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.
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 */
__set_errno (ENOSYS);
return -1;
}
-
+libc_hidden_def (__dirfd)
weak_alias (__dirfd, dirfd)
stub_warning (dirfd)
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)
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)
--- /dev/null
+# 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
# 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
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,
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
--- /dev/null
+/* 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 */
#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
#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)
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)
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));
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)
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
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);
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)
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)
libc_hidden_proto (memmem)
extern __typeof (memmem) __memmem;
libc_hidden_proto (__memmem)
+libc_hidden_proto (__memrchr)
libc_hidden_proto (__ffs)
#if IS_IN (libc)
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,
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,
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;
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__;
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
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.
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 */
return fp;
}
+libc_hidden_def (_IO_new_file_setbuf)
libc_hidden_ver (_IO_new_file_setbuf, _IO_file_setbuf)
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
/* 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;
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)
}
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)
_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);
_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);
{
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);
*target = source;
}
-void
+static void
_IO_cookie_init (struct _IO_cookie_file *cfile, int read_write,
void *cookie, cookie_io_functions_t io_functions)
{
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)
_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);
_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);
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*);
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;
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)
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) \
_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)
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.
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 *);
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 \
__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
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. */
/* 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;
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);
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) \
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)
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 *);
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;
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);
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)
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);
#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>
/* 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;
__realloc_hook = tr_old_realloc_hook;
__memalign_hook = tr_old_memalign_hook;
- fprintf (f, "= End\n");
+ fputs ("= End\n", f);
fclose (f);
}
#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)
return res;
}
-
+libm_hidden_def (M_SUF (__casin))
declare_mgen_alias (__casin, casin)
return res;
}
-
+libm_hidden_def (M_SUF (__casinh))
declare_mgen_alias (__casinh, casinh)
return retval;
}
-
+libm_hidden_def (M_SUF (__ccosh))
declare_mgen_alias (__ccosh, ccosh);
return retval;
}
+libm_hidden_def (M_SUF (__cexp))
declare_mgen_alias (__cexp, cexp)
return result;
}
-
+libm_hidden_def (M_SUF (__clog))
declare_mgen_alias (__clog, clog)
return res;
}
+libm_hidden_def (M_SUF (__csqrt))
declare_mgen_alias (__csqrt, csqrt)
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)
__set_errno (ERANGE);
return z;
}
+libm_hidden_def (__atan2)
libm_alias_double (__atan2, atan2)
#endif
__set_errno (ERANGE);
return z;
}
+libm_hidden_def (M_SUF (__atan2))
declare_mgen_alias (__atan2, atan2)
#endif /* __USE_WRAPPER_TEMPLATE. */
__set_errno (ERANGE);
return z;
}
+libm_hidden_def (__atan2f)
libm_alias_float (__atan2, atan2)
#endif
__set_errno (ERANGE);
return z;
}
+libm_hidden_def (__atan2l)
libm_alias_ldouble (__atan2, atan2)
#endif
return z;
}
+libm_hidden_def (__hypot)
libm_alias_double (__hypot, hypot)
#endif
__set_errno (ERANGE);
return z;
}
+libm_hidden_def (M_SUF (__hypot))
declare_mgen_alias (__hypot, hypot)
#endif /* __USE_WRAPPER_TEMPLATE. */
return z;
}
+libm_hidden_def (__hypotf)
libm_alias_float (__hypot, hypot)
#endif
return z;
}
+libm_hidden_def (__hypotl)
libm_alias_ldouble (__hypot, hypot)
#endif
}
return r;
}
+libm_hidden_def (M_SUF (__ilogb))
declare_mgen_alias (__ilogb, ilogb)
return __ieee754_log (x);
}
+libm_hidden_def (__log)
libm_alias_double (__log, log)
#endif
}
return M_SUF (__ieee754_log) (x);
}
+libm_hidden_def (M_SUF (__log))
declare_mgen_alias (__log, log)
#endif /* __USE_WRAPPER_TEMPLATE. */
return __ieee754_logl (x);
}
+libm_hidden_def (__logl)
libm_alias_ldouble (__log, log)
#endif
return __ieee754_sqrt (x);
}
+libm_hidden_def (__sqrt)
libm_alias_double (__sqrt, sqrt)
#endif
__set_errno (EDOM);
return M_SUF (__ieee754_sqrt) (x);
}
+libm_hidden_def (M_SUF (__sqrt))
declare_mgen_alias (__sqrt, sqrt)
#endif /* __USE_WRAPPER_TEMPLATE. */
return __ieee754_sqrtf (x);
}
+libm_hidden_def (__sqrtf)
libm_alias_float (__sqrt, sqrt)
#endif
return __ieee754_sqrtl (x);
}
+libm_hidden_def (__sqrtl)
libm_alias_ldouble (__sqrt, sqrt)
#endif
#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
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 */
# include <posix/glob.c>
+libc_hidden_def (__glob_lstat_compat)
compat_symbol (libc, __glob_lstat_compat, glob, GLIBC_2_0);
#endif
}
#if defined _LIBC && !defined __glob
versioned_symbol (libc, __glob, glob, GLIBC_2_27);
+libc_hidden_def (__glob)
libc_hidden_ver (__glob, glob)
#endif
# 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
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)
{
__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)
{
return __glob_pattern_type (pattern, quote) == GLOBPAT_SPECIAL;
}
+libc_hidden_def (__glob_pattern_p)
weak_alias (__glob_pattern_p, glob_pattern_p)
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
}
}
-extern void
+static void
addrsort (char **ap, int num)
{
int i, j;
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_ */
* author:
* paul vixie, 29may94
*/
-int
+static int
res_ourserver_p(const res_state statp, const struct sockaddr_in6 *inp)
{
int ns;
--- /dev/null
+#! /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
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);
}
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)
return 0;
}
#ifndef MEMRCHR
-# ifdef weak_alias
+libc_hidden_def (__memrchr)
weak_alias (__memrchr, memrchr)
-# endif
#endif
/* This should never happen. */
return NULL;
}
-
+libc_hidden_def (__strchrnul)
weak_alias (__strchrnul, strchrnul)
return result;
}
#ifndef __strncasecmp
+libc_hidden_def (__strncasecmp)
weak_alias (__strncasecmp, strncasecmp)
#endif
#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
#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
#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
#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)
#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
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)
#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};
ret
END(__strchrnul)
+libc_hidden_def (__strchrnul)
weak_alias (__strchrnul, strchrnul)
/* 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) \
#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)
/* 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
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
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
#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
#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
* 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)
asm ("frndint" : "=t" (res) : "0" (x));
return res;
}
-
+libm_hidden_def (__rintl)
libm_alias_ldouble (__rint, rint)
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
libc_ifunc_redirected (__redirect_strncasecmp, __strncasecmp,
IFUNC_SELECTOR ());
-
+libc_hidden_def (__strncasecmp)
weak_alias (__strncasecmp, strncasecmp)
#endif
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
ret
END (__strchrnul)
-
+libc_hidden_def (__strchrnul)
weak_alias (__strchrnul, strchrnul)
/* 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
#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
else
return r / x - one;
}
+libm_hidden_def (__erf)
libm_alias_double (__erf, erf)
double
return two - tiny;
}
}
+libm_hidden_def (__erfc)
libm_alias_double (__erfc, erfc)
}
return y;
}
+libm_hidden_def (__expm1)
libm_alias_double (__expm1, expm1)
INSERT_WORDS (x, hx, lx);
return x;
}
-
+libm_hidden_def (__nextup)
libm_alias_double (__nextup, nextup)
*sinx = *cosx = x / x;
}
+libm_hidden_def (__sincos)
libm_alias_double (__sincos, sincos)
*eptr = e;
return x;
}
+libm_hidden_def (__frexp)
libm_alias_double (__frexp, frexp)
libc_fesetenv (&env);
return t;
}
+libm_hidden_def (__nearbyint)
libm_alias_double (__nearbyint, nearbyint)
INSERT_WORDS64 (x, i0);
return x;
}
+libm_hidden_def (__round)
libm_alias_double (__round, round)
return (hx<0)? -z:z;
}
}
+libm_hidden_def (__atanf)
libm_alias_float (__atan, atan)
SET_FLOAT_WORD(x,i0);
return x;
}
+libm_hidden_def (__ceilf)
#ifndef __ceilf
libm_alias_float (__ceil, ceil)
#endif
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)
return two-tiny;
}
}
+libm_hidden_def (__erfcf)
libm_alias_float (__erfc, erfc)
}
return y;
}
+libm_hidden_def (__expm1f)
libm_alias_float (__expm1, expm1)
SET_FLOAT_WORD(x,i0);
return x;
}
+libm_hidden_def (__floorf)
#ifndef __floorf
libm_alias_float (__floor, floor)
#endif
SET_FLOAT_WORD(x,hx);
return x;
}
+libm_hidden_def (__frexpf)
libm_alias_float (__frexp, frexp)
libc_fesetenvf (&env);
return t;
}
+libm_hidden_def (__nearbyintf)
libm_alias_float (__nearbyint, nearbyint)
SET_FLOAT_WORD (x, hx);
return x;
}
-
+libm_hidden_def (__nextupf)
libm_alias_float (__nextup, nextup)
w = TWO23[sx]+x;
return w-TWO23[sx];
}
+libm_hidden_def (__rintf)
#ifndef __rintf
libm_alias_float (__rint, rint)
#endif
SET_FLOAT_WORD (x, ix);
return x;
}
+libm_hidden_def (__roundevenf)
libm_alias_float (__roundeven, roundeven)
SET_FLOAT_WORD (x, i0);
return x;
}
+libm_hidden_def (__roundf)
libm_alias_float (__round, round)
return x;
}
+libm_hidden_def (__truncf)
#ifndef __truncf
libm_alias_float (__trunc, trunc)
#endif
else
return u;
}
-
+libm_hidden_def (__atanl)
libm_alias_ldouble (__atan, atan)
SET_LDOUBLE_WORDS64(x,i0,i1);
return x;
}
+libm_hidden_def (__ceill)
libm_alias_ldouble (__ceil, ceil)
}
}
}
+libm_hidden_def (__cosl)
libm_alias_ldouble (__cos, cos)
y = -y;
return( y );
}
-
+libm_hidden_def (__erfl)
libm_alias_ldouble (__erf, erf)
+
_Float128
__erfcl (_Float128 x)
{
return two - tiny;
}
}
-
+libm_hidden_def (__erfcl)
libm_alias_ldouble (__erfc, erfc)
SET_LDOUBLE_WORDS64(x,i0,i1);
return x;
}
+libm_hidden_def (__floorl)
libm_alias_ldouble (__floor, floor)
SET_LDOUBLE_MSW64(x,hx);
return x;
}
+libm_hidden_def (__frexpl)
libm_alias_ldouble (__frexp, frexp)
fesetenv (&env);
return t;
}
+libm_hidden_def (__nearbyintl)
libm_alias_ldouble (__nearbyint, nearbyint)
SET_LDOUBLE_WORDS64 (x, hx, lx);
return x;
}
-
+libm_hidden_def (__nextupl)
libm_alias_ldouble (__nextup, nextup)
w = TWO112[sx]+x;
return w-TWO112[sx];
}
+libm_hidden_def (__rintl)
libm_alias_ldouble (__rint, rint)
SET_LDOUBLE_WORDS64 (x, hx, lx);
return x;
}
+libm_hidden_def (__roundevenl)
libm_alias_ldouble (__roundeven, roundeven)
SET_LDOUBLE_WORDS64 (x, i0, i1);
return x;
}
+libm_hidden_def (__roundl)
libm_alias_ldouble (__round, round)
}
}
}
+libm_hidden_def (__sincosl)
libm_alias_ldouble (__sincos, sincos)
}
}
}
+libm_hidden_def (__sinl)
libm_alias_ldouble (__sin, sin)
return x;
}
+libm_hidden_def (__truncl)
libm_alias_ldouble (__trunc, trunc)
}
}
}
+libm_hidden_def (__cosl)
libm_alias_ldouble (__cos, cos)
else
return r / x - one;
}
-
+libm_hidden_def (__erfl)
libm_alias_ldouble (__erf, erf)
+
long double
__erfcl (long double x)
{
return two - tiny;
}
}
-
+libm_hidden_def (__erfcl)
libm_alias_ldouble (__erfc, erfc)
SET_LDOUBLE_EXP(x,se);
return x;
}
+libm_hidden_def (__frexpl)
libm_alias_ldouble (__frexp, frexp)
SET_LDOUBLE_WORDS (x, esx, hx, lx);
return x;
}
-
+libm_hidden_def (__nextupl)
libm_alias_ldouble (__nextup, nextup)
SET_LDOUBLE_WORDS (x, se, hx, lx);
return x;
}
+libm_hidden_def (__roundevenl)
libm_alias_ldouble (__roundeven, roundeven)
SET_LDOUBLE_WORDS (x, se, i0, i1);
return x;
}
+libm_hidden_def (__roundl)
libm_alias_ldouble (__round, round)
{
return __builtin_signbitl (x);
}
+#if IS_IN (libc) || IS_IN (libm)
+hidden_def (__signbitl)
+#endif
}
}
}
+libm_hidden_def (__sincosl)
libm_alias_ldouble (__sincos, sincos)
}
}
}
+libm_hidden_def (__sinl)
libm_alias_ldouble (__sin, sin)
cfi_restore (R(d2))
rts
END(__strchrnul)
-
+libc_hidden_def (__strchrnul)
weak_alias (__strchrnul, strchrnul)
return fd;
}
+libc_hidden_def (__dirfd)
weak_alias (__dirfd, dirfd)
{
return dirp->fd;
}
-
+libc_hidden_def (__dirfd)
weak_alias (__dirfd, dirfd)
(hwcap & PPC_FEATURE_HAS_VSX)
? __memrchr_power7
: __memrchr_ppc);
-
+libc_hidden_def (__memrchr)
weak_alias (__memrchr, memrchr)
#else
#include <string/memrchr.c>
(hwcap & PPC_FEATURE_HAS_VSX)
? __strchrnul_power7
: __strchrnul_ppc);
-
+libc_hidden_def (__strchrnul)
weak_alias (__strchrnul, strchrnul)
#else
#include <string/strchrnul.c>
END (__memrchr)
weak_alias (__memrchr, memrchr)
libc_hidden_builtin_def (memrchr)
+libc_hidden_builtin_def (__memrchr)
(hwcap & PPC_FEATURE_HAS_VSX)
? __memrchr_power7
: __memrchr_ppc);
-
+libc_hidden_def (__memrchr)
weak_alias (__memrchr, memrchr)
#else
#include <string/memrchr.c>
(hwcap & PPC_FEATURE_HAS_VSX)
? __strchrnul_power7
: __strchrnul_ppc);
-
+libc_hidden_def (__strchrnul)
weak_alias (__strchrnul, strchrnul)
#else
#include <string/strchrnul.c>
END (MEMRCHR)
weak_alias (__memrchr, memrchr)
libc_hidden_builtin_def (memrchr)
+libc_hidden_builtin_def (__memrchr)
END (MEMRCHR)
weak_alias (__memrchr, memrchr)
libc_hidden_builtin_def (memrchr)
+libc_hidden_builtin_def (__memrchr)
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
# include <ifunc-resolve.h>
s390_vx_libc_ifunc (__memrchr)
+libc_hidden_def (__memrchr)
weak_alias (__memrchr, memrchr)
#else
# include <ifunc-resolve.h>
s390_vx_libc_ifunc (__strchrnul)
+libc_hidden_def (__strchrnul)
weak_alias (__strchrnul, strchrnul)
#else
# include <ifunc-resolve.h>
s390_vx_libc_ifunc (__wcslen)
+libc_hidden_def (__wcslen)
weak_alias (__wcslen, wcslen)
#else
# include <ifunc-resolve.h>
s390_vx_libc_ifunc (__wcsnlen)
+libc_hidden_def (__wcsnlen)
weak_alias (__wcsnlen, wcsnlen)
#else
g = z;
return ((char *) p) + (g >> 3);
}
+libc_hidden_def (__strchrnul)
weak_alias (__strchrnul, strchrnul)
/* 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)
/* 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)
#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)
#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 */
# File name Caller Syscall name # args Strong name Weak names
-umount2 - umount 2 __umount2 umount2
-
getpriority - getpriority i:ii __getpriority getpriority
# proper socket implementations:
/* 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)
#endif
ret
PSEUDO_END(__umount2)
+libc_hidden_def (__umount2)
weak_alias (__umount2, umount2)
#endif
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>
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,
extern int __timer_settime_old (int timerid, int flags,
const struct itimerspec *value,
struct itimerspec *ovalue);
+
+#endif
#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);
#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);
#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);
#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);
#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);
/* 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);
--- /dev/null
+/* 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
#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
#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))
{
return 0;
}
- return ____feraiseexcept_renamed (__excepts);
+ return __feraiseexcept_renamed (__excepts);
}
__END_DECLS
-#endif
-# endif /* _ISOMAC */
+#endif /* __USE_EXTERN_INLINES && !_ISOMAC */
#endif /* bits/fenv.h */
+#include <math.h>
+
#define __ieee754_log __ieee754_log_avx
#define SECTION __attribute__ ((section (".text.avx")))
+#include <math.h>
+
#define __ieee754_log __ieee754_log_fma
#define SECTION __attribute__ ((section (".text.fma")))
+#include <math.h>
+
#define __ieee754_log __ieee754_log_fma4
#define SECTION __attribute__ ((section (".text.fma4")))
+#include <math.h>
+
#define __logf __logf_fma
#include <sysdeps/ieee754/flt-32/e_logf.c>
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"
+#include <math.h>
+
#define __atan __atan_avx
#define __add __add_avx
#define __dbl_mp __dbl_mp_avx
+#include <math.h>
+
#define __atan __atan_fma
#define __add __add_fma
#define __dbl_mp __dbl_mp_fma
+#include <math.h>
+
#define __atan __atan_fma4
#define __add __add_fma4
#define __dbl_mp __dbl_mp_fma4
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);
#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
+#include <math.h>
#define __ceil __ceil_c
#include <sysdeps/ieee754/dbl-64/wordsize-64/s_ceil.c>
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)
<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)
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)
+#include <math.h>
#undef __floor
#define __floor __floor_c
#include <sysdeps/ieee754/dbl-64/wordsize-64/s_floor.c>
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)
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)
+#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>
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)
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)
+#include <math.h>
#undef __rint
#define __rint __rint_c
#include <sysdeps/ieee754/dbl-64/wordsize-64/s_rint.c>
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)
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)
+#include <math.h>
+
#define __cos __cos_avx
#define __sin __sin_avx
#define SECTION __attribute__ ((section (".text.avx")))
+#include <math.h>
+
#define __cos __cos_fma
#define __sin __sin_fma
#define __docos __docos_fma
+#include <math.h>
+
#define __cos __cos_fma4
#define __sin __sin_fma4
#define __docos __docos_fma4
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);
#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
#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
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)
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)
+#include <math.h>
#define __trunc __trunc_c
#include <sysdeps/ieee754/dbl-64/wordsize-64/s_trunc.c>
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)
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)
ret
END (__ceill)
+libm_hidden_def (__ceill)
libm_alias_ldouble (__ceil, ceil)
ret
END (__floorl)
+libm_hidden_def (__floorl)
libm_alias_ldouble (__floor, floor)
ret
END (__log1pl)
+libm_hidden_def (__log1pl)
fstp %st(1)
ret
END (__scalbnl)
+#if IS_IN (libc) || IS_IN (libm)
+hidden_def (__scalbnl)
+#endif
ASM_SIZE_DIRECTIVE(L(SP_ONE))
#ifndef __sincosf
+libm_hidden_def (__sincosf)
libm_alias_float (__sincos, sincos)
#endif
fldenv -28(%rsp)
ret
END(__truncl)
+libm_hidden_def (__truncl)
libm_alias_ldouble (__trunc, trunc)
ret
END (__memrchr)
+libc_hidden_def (__memrchr)
weak_alias (__memrchr, memrchr)
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
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
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
<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
<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>
}
libc_ifunc_redirected (__redirect_wcsnlen, __wcsnlen, IFUNC_SELECTOR ());
-weak_alias (__wcsnlen, wcsnlen);
+libc_hidden_def (__wcsnlen)
+weak_alias (__wcsnlen, wcsnlen)
#endif
#define AS_STRCHRNUL
#include "strchr.S"
+libc_hidden_def (__strchrnul)
weak_alias (__strchrnul, strchrnul)
ret
END (__wcslen)
-
+libc_hidden_def (__wcslen)
weak_alias(__wcslen, wcslen)
}
#ifndef WCPNCPY
+libc_hidden_def (__wcpncpy)
weak_alias (__wcpncpy, wcpncpy)
#endif
return dest;
}
#ifndef WCSCAT
+libc_hidden_def (__wcscat)
weak_alias (__wcscat, wcscat)
#endif
return (wchar_t *) wcs;
}
#ifndef WCSCHRNUL
+libc_hidden_def (__wcschrnul)
weak_alias (__wcschrnul, wcschrnul)
#endif
return len;
}
#ifndef WCSLEN
+libc_hidden_def (__wcslen)
weak_alias (__wcslen, wcslen)
#endif
return s;
}
#ifndef WCSNCPY
+libc_hidden_def (__wcsncpy)
weak_alias (__wcsncpy, wcsncpy)
#endif
return len;
}
#ifndef WCSNLEN
+libc_hidden_def (__wcsnlen)
weak_alias (__wcsnlen, wcsnlen)
#endif
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)
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)