diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2016-08-20 19:14:56 +0200 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2016-08-20 19:14:56 +0200 |
commit | f76453c31593957fec1a99b986bfa5506618b79c (patch) | |
tree | da353c882fb9b2261c9871bcb9e3876a3e6ed7f6 /include/libc-symbols.h | |
parent | 58695b88a9deaecbcf7794760cc333177edaa2b4 (diff) | |
parent | 78bd7499af46d739ce94410eaeea006e874ca9e5 (diff) |
Merge tag 'glibc-2.22' into baseline
The GNU C Library
=================
The GNU C Library version 2.22 is now available.
The GNU C Library is used as *the* C library in the GNU system and
in GNU/Linux systems, as well as many other systems that use Linux
as the kernel.
The GNU C Library is primarily designed to be a portable
and high performance C library. It follows all relevant
standards including ISO C11 and POSIX.1-2008. It is also
internationalized and has one of the most complete
internationalization interfaces known.
The GNU C Library webpage is at http://www.gnu.org/software/libc/
Packages for the 2.22 release may be downloaded from:
http://ftpmirror.gnu.org/libc/
http://ftp.gnu.org/gnu/libc/
The mirror list is at http://www.gnu.org/order/ftp.html
NEWS for version 2.22
=====================
* The following bugs are resolved with this release:
438, 4719, 6544, 6792, 11216, 12836, 13028, 13064, 13151, 13152, 14094,
14292, 14841, 14906, 14958, 15319, 15467, 15790, 15969, 16159, 16339,
16350, 16351, 16352, 16353, 16361, 16512, 16526, 16538, 16559, 16560,
16704, 16783, 16850, 17053, 17090, 17195, 17269, 17293, 17322, 17403,
17475, 17523, 17542, 17569, 17581, 17588, 17596, 17620, 17621, 17628,
17631, 17692, 17711, 17715, 17776, 17779, 17792, 17833, 17836, 17841,
17912, 17916, 17930, 17932, 17944, 17949, 17964, 17965, 17967, 17969,
17977, 17978, 17987, 17991, 17996, 17998, 17999, 18007, 18019, 18020,
18029, 18030, 18032, 18034, 18036, 18038, 18039, 18042, 18043, 18046,
18047, 18049, 18068, 18080, 18093, 18100, 18104, 18110, 18111, 18116,
18125, 18128, 18134, 18138, 18185, 18196, 18197, 18206, 18210, 18211,
18217, 18219, 18220, 18221, 18234, 18244, 18245, 18247, 18287, 18319,
18324, 18333, 18346, 18371, 18383, 18397, 18400, 18409, 18410, 18412,
18418, 18422, 18434, 18444, 18457, 18468, 18469, 18470, 18479, 18483,
18495, 18496, 18497, 18498, 18502, 18507, 18508, 18512, 18513, 18519,
18520, 18522, 18527, 18528, 18529, 18530, 18532, 18533, 18534, 18536,
18539, 18540, 18542, 18544, 18545, 18546, 18547, 18549, 18553, 18557,
18558, 18569, 18583, 18585, 18586, 18592, 18593, 18594, 18602, 18612,
18613, 18619, 18633, 18641, 18643, 18648, 18657, 18676, 18694, 18696.
* Cache information can be queried via sysconf() function on s390 e.g. with
_SC_LEVEL1_ICACHE_SIZE as argument.
* A buffer overflow in gethostbyname_r and related functions performing DNS
requests has been fixed. If the NSS functions were called with a
misaligned buffer, the buffer length change due to pointer alignment was
not taken into account. This could result in application crashes or,
potentially arbitrary code execution, using crafted, but syntactically
valid DNS responses. (CVE-2015-1781)
* The time zone file parser has been made more robust against crafted time
zone files, avoiding heap buffer overflows related to the processing of
the tzh_ttisstdcnt and tzh_ttisgmtcnt fields, and a stack overflow due to
large time zone data files. Overly long time zone specifiers in the TZ
variable no longer result in stack overflows and crashes.
* A powerpc and powerpc64 optimization for TLS, similar to TLS descriptors
for LD and GD on x86 and x86-64, has been implemented. You will need
binutils-2.24 or later to enable this optimization.
* Character encoding and ctype tables were updated to Unicode 7.0.0, using
new generator scripts contributed by Pravin Satpute and Mike FABIAN (Red
Hat). These updates cause user visible changes, such as the fix for bug
17998.
* CVE-2014-8121 The NSS backends shared internal state between the getXXent
and getXXbyYY NSS calls for the same database, causing a denial-of-service
condition in some applications.
* Added vector math library named libmvec with the following vectorized x86_64
implementations: cos, cosf, sin, sinf, sincos, sincosf, log, logf, exp, expf,
pow, powf.
The library can be disabled with --disable-mathvec. Use of the functions is
enabled with -fopenmp -ffast-math starting from -O1 for GCC version >= 4.9.0.
Shared library libmvec.so is linked in as needed when using -lm (no need to
specify -lmvec explicitly for not static builds).
Visit <https://sourceware.org/glibc/wiki/libmvec> for detailed information.
* A new fmemopen implementation has been added with the goal of POSIX
compliance. The new implementation fixes the following long-standing
issues: BZ#6544, BZ#11216, BZ#12836, BZ#13151, BZ#13152, and BZ#14292. The
old implementation is still present for use be by existing binaries.
* The 32-bit sparc sigaction ABI was inadvertently broken in the 2.20 and 2.21
releases. It has been fixed to match 2.19 and older, but binaries built
against 2.20 and 2.21 might need to be recompiled. See BZ#18694.
* Port to Native Client running on ARMv7-A (--host=arm-nacl).
Contributed by Roland McGrath (Google).
Contributors
============
This release was made possible by the contributions of many people.
The maintainers are grateful to everyone who has contributed
changes or bug reports. These include:
Adhemerval Zanella
Alan Modra
Alexandre Oliva
Andreas Schwab
Andrew Senkevich
Andriy Rysin
Arjun Shankar
Aurelien Jarno
Benno Schulenberg
Brad Hubbard
Carlos O'Donell
Chris Metcalf
Christian Schmidt
Chung-Lin Tang
Cong Wang
Cyril Hrubis
Daniel Marjamäki
David S. Miller
Dmitry V. Levin
Eric Rannaud
Evangelos Foutras
Feng Gao
Florian Weimer
Gleb Fotengauer-Malinovskiy
H.J. Lu
Igor Zamyatin
J William Piggott
James Cowgill
James Lemke
John David Anglin
Joseph Myers
Kevin Easton
Khem Raj
Leonhard Holz
Mark Wielaard
Marko Myllynen
Martin Galvan
Martin Sebor
Matthew Fortune
Mel Gorman
Mike Frysinger
Miroslav Lichvar
Nathan Lynch
Ondřej Bílka
Paul Eggert
Paul Pluzhnikov
Pavel Kopyl
Pravin Satpute
Rajalakshmi Srinivasaraghavan
Rical Jasan
Richard Henderson
Roland McGrath
Rüdiger Sonderfeld
Samuel Thibault
Siddhesh Poyarekar
Stefan Liebler
Steve Ellcey
Szabolcs Nagy
Torvald Riegel
Tulio Magno Quites Machado Filho
Vincent Bernat
Wilco Dijkstra
Yaakov Selkowitz
Zack Weinberg
Diffstat (limited to 'include/libc-symbols.h')
-rw-r--r-- | include/libc-symbols.h | 185 |
1 files changed, 73 insertions, 112 deletions
diff --git a/include/libc-symbols.h b/include/libc-symbols.h index 4b233be0bd..743b6f6f5b 100644 --- a/include/libc-symbols.h +++ b/include/libc-symbols.h @@ -1,6 +1,6 @@ /* Support macros for making weak and strong aliases for symbols, and for using symbol sets and linker warnings with GNU ld. - Copyright (C) 1995-2014 Free Software Foundation, Inc. + Copyright (C) 1995-2015 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 @@ -20,6 +20,17 @@ #ifndef _LIBC_SYMBOLS_H #define _LIBC_SYMBOLS_H 1 +#define IN_MODULE PASTE_NAME (MODULE_, MODULE_NAME) +#define IS_IN(lib) (IN_MODULE == MODULE_##lib) + +/* Returns true if the current module is a versioned library. Versioned + library names culled from shlib-versions files are assigned a MODULE_* + value lower than MODULE_LIBS_BEGIN. */ +#define IS_IN_LIB (IN_MODULE > MODULE_LIBS_BEGIN) + +#define PASTE_NAME(a,b) PASTE_NAME1 (a,b) +#define PASTE_NAME1(a,b) a##b + /* This file's macros are included implicitly in the compilation of every file in the C library by -imacros. @@ -48,6 +59,25 @@ #include <config.h> +/* Define this for the benefit of portable GNU code that wants to check it. + Code that checks with #if will not #include <config.h> again, since we've + already done it (and this file is implicitly included in every compile, + via -include). Code that checks with #ifdef will #include <config.h>, + but that file should always be idempotent (i.e., it's just #define/#undef + and nothing else anywhere should be changing the macro state it touches), + so it's harmless. */ +#define HAVE_CONFIG_H 0 + +/* Define these macros for the benefit of portable GNU code that wants to check + them. Of course, STDC_HEADERS is never false when building libc! */ +#define STDC_HEADERS 1 +#define HAVE_MBSTATE_T 1 +#define HAVE_MBSRTOWCS 1 +#define HAVE_LIBINTL_H 1 +#define HAVE_WCTYPE_H 1 +#define HAVE_ISWCTYPE 1 +#define ENABLE_NLS 1 + /* The symbols in all the user (non-_) macros are C symbols. */ #if !defined HAVE_ASM_WEAK_DIRECTIVE && !defined HAVE_ASM_WEAKEXT_DIRECTIVE @@ -66,17 +96,6 @@ # define ASM_LINE_SEP ; #endif -#ifdef HAVE_ASM_GLOBAL_DOT_NAME -# ifndef C_SYMBOL_DOT_NAME -# if defined __GNUC__ && defined __GNUC_MINOR__ \ - && (__GNUC__ << 16) + __GNUC_MINOR__ >= (3 << 16) + 1 -# define C_SYMBOL_DOT_NAME(name) .name -# else -# define C_SYMBOL_DOT_NAME(name) .##name -# endif -# endif -#endif - #ifndef __ASSEMBLER__ /* GCC understands weak symbols and aliases; use its interface where possible, instead of embedded assembly language. */ @@ -112,64 +131,28 @@ #else /* __ASSEMBLER__ */ # ifdef HAVE_ASM_SET_DIRECTIVE -# ifdef HAVE_ASM_GLOBAL_DOT_NAME -# define strong_alias(original, alias) \ - .globl C_SYMBOL_NAME (alias) ASM_LINE_SEP \ - .set C_SYMBOL_NAME (alias),C_SYMBOL_NAME (original) ASM_LINE_SEP \ - .globl C_SYMBOL_DOT_NAME (alias) ASM_LINE_SEP \ - .set C_SYMBOL_DOT_NAME (alias),C_SYMBOL_DOT_NAME (original) -# define strong_data_alias(original, alias) \ +# define strong_alias(original, alias) \ .globl C_SYMBOL_NAME (alias) ASM_LINE_SEP \ .set C_SYMBOL_NAME (alias),C_SYMBOL_NAME (original) -# else -# define strong_alias(original, alias) \ - .globl C_SYMBOL_NAME (alias) ASM_LINE_SEP \ - .set C_SYMBOL_NAME (alias),C_SYMBOL_NAME (original) -# define strong_data_alias(original, alias) strong_alias(original, alias) -# endif +# define strong_data_alias(original, alias) strong_alias(original, alias) # else -# ifdef HAVE_ASM_GLOBAL_DOT_NAME -# define strong_alias(original, alias) \ - .globl C_SYMBOL_NAME (alias) ASM_LINE_SEP \ - C_SYMBOL_NAME (alias) = C_SYMBOL_NAME (original) ASM_LINE_SEP \ - .globl C_SYMBOL_DOT_NAME (alias) ASM_LINE_SEP \ - C_SYMBOL_DOT_NAME (alias) = C_SYMBOL_DOT_NAME (original) -# define strong_data_alias(original, alias) \ +# define strong_alias(original, alias) \ .globl C_SYMBOL_NAME (alias) ASM_LINE_SEP \ C_SYMBOL_NAME (alias) = C_SYMBOL_NAME (original) -# else -# define strong_alias(original, alias) \ - .globl C_SYMBOL_NAME (alias) ASM_LINE_SEP \ - C_SYMBOL_NAME (alias) = C_SYMBOL_NAME (original) -# define strong_data_alias(original, alias) strong_alias(original, alias) -# endif +# define strong_data_alias(original, alias) strong_alias(original, alias) # endif # ifdef HAVE_ASM_WEAKEXT_DIRECTIVE -# ifdef HAVE_ASM_GLOBAL_DOT_NAME -# define weak_alias(original, alias) \ - .weakext C_SYMBOL_NAME (alias), C_SYMBOL_NAME (original) ASM_LINE_SEP \ - .weakext C_SYMBOL_DOT_NAME (alias), C_SYMBOL_DOT_NAME (original) -# else -# define weak_alias(original, alias) \ +# define weak_alias(original, alias) \ .weakext C_SYMBOL_NAME (alias), C_SYMBOL_NAME (original) -# endif # define weak_extern(symbol) \ .weakext C_SYMBOL_NAME (symbol) # else /* ! HAVE_ASM_WEAKEXT_DIRECTIVE */ -# ifdef HAVE_ASM_GLOBAL_DOT_NAME -# define weak_alias(original, alias) \ - .weak C_SYMBOL_NAME (alias) ASM_LINE_SEP \ - C_SYMBOL_NAME (alias) = C_SYMBOL_NAME (original) ASM_LINE_SEP \ - .weak C_SYMBOL_DOT_NAME (alias) ASM_LINE_SEP \ - C_SYMBOL_DOT_NAME (alias) = C_SYMBOL_DOT_NAME (original) -# else -# define weak_alias(original, alias) \ +# define weak_alias(original, alias) \ .weak C_SYMBOL_NAME (alias) ASM_LINE_SEP \ C_SYMBOL_NAME (alias) = C_SYMBOL_NAME (original) -# endif # define weak_extern(symbol) \ .weak C_SYMBOL_NAME (symbol) @@ -328,33 +311,15 @@ for linking") # define default_symbol_version(real, name, version) \ _default_symbol_version(real, name, version) # ifdef __ASSEMBLER__ -# ifdef HAVE_ASM_GLOBAL_DOT_NAME -# define _symbol_version(real, name, version) \ - .symver real, name##@##version ASM_LINE_SEP \ - .symver C_SYMBOL_DOT_NAME(real), C_SYMBOL_DOT_NAME(name##@##version) -# define _default_symbol_version(real, name, version) \ - .symver real, name##@##@##version ASM_LINE_SEP \ - .symver C_SYMBOL_DOT_NAME(real), C_SYMBOL_DOT_NAME(name##@##@##version) -# else -# define _symbol_version(real, name, version) \ +# define _symbol_version(real, name, version) \ .symver real, name##@##version -# define _default_symbol_version(real, name, version) \ +# define _default_symbol_version(real, name, version) \ .symver real, name##@##@##version -# endif # else -# ifdef HAVE_ASM_GLOBAL_DOT_NAME -# define _symbol_version(real, name, version) \ - __asm__ (".symver " #real "," #name "@" #version "\n\t" \ - ".symver ." #real ",." #name "@" #version) -# define _default_symbol_version(real, name, version) \ - __asm__ (".symver " #real "," #name "@@" #version "\n\t" \ - ".symver ." #real ",." #name "@@" #version) -# else -# define _symbol_version(real, name, version) \ +# define _symbol_version(real, name, version) \ __asm__ (".symver " #real "," #name "@" #version) -# define _default_symbol_version(real, name, version) \ +# define _default_symbol_version(real, name, version) \ __asm__ (".symver " #real "," #name "@@" #version) -# endif # endif #else # define symbol_version(real, name, version) @@ -372,26 +337,6 @@ for linking") #define attribute_relro __attribute__ ((section (".data.rel.ro"))) -/* Handling on non-exported internal names. We have to do this only - for shared code. */ -#ifdef SHARED -# define INTUSE(name) name##_internal -# define INTDEF(name) strong_alias (name, name##_internal) -# define INTVARDEF(name) \ - _INTVARDEF (name, name##_internal) -# define _INTVARDEF(name, aliasname) \ - extern __typeof (name) aliasname __attribute__ ((alias (#name), \ - visibility ("hidden"))); -# define INTDEF2(name, newname) strong_alias (name, newname##_internal) -# define INTVARDEF2(name, newname) _INTVARDEF (name, newname##_internal) -#else -# define INTUSE(name) name -# define INTDEF(name) -# define INTVARDEF(name) -# define INTDEF2(name, newname) -# define INTVARDEF2(name, newname) -#endif - /* The following macros are used for PLT bypassing within libc.so (and if needed other libraries similarly). First of all, you need to have the function prototyped somewhere, @@ -449,7 +394,7 @@ for linking") If the function should be internal to multiple objects, say ld.so and libc.so, the best way is to use: - #if !defined NOT_IN_libc || defined IS_IN_rtld + #if IS_IN (libc) || IS_IN (rtld) hidden_proto (foo) #endif @@ -517,11 +462,7 @@ for linking") # define hidden_data_def(name) strong_data_alias (name, __GI_##name) # define hidden_data_weak(name) hidden_data_def (name) # define hidden_data_ver(local, name) strong_data_alias (local, __GI_##name) -# ifdef HAVE_ASM_GLOBAL_DOT_NAME -# define HIDDEN_JUMPTARGET(name) .__GI_##name -# else -# define HIDDEN_JUMPTARGET(name) __GI_##name -# endif +# define HIDDEN_JUMPTARGET(name) __GI_##name # endif #else # ifndef __ASSEMBLER__ @@ -539,7 +480,7 @@ for linking") # define hidden_nolink(name, lib, version) #endif -#if !defined NOT_IN_libc +#if IS_IN (libc) # define libc_hidden_proto(name, attrs...) hidden_proto (name, ##attrs) # define libc_hidden_tls_proto(name, attrs...) hidden_tls_proto (name, ##attrs) # define libc_hidden_def(name) hidden_def (name) @@ -565,7 +506,7 @@ for linking") # define libc_hidden_data_ver(local, name) #endif -#if defined NOT_IN_libc && defined IS_IN_rtld +#if IS_IN (rtld) # define rtld_hidden_proto(name, attrs...) hidden_proto (name, ##attrs) # define rtld_hidden_tls_proto(name, attrs...) hidden_tls_proto (name, ##attrs) # define rtld_hidden_def(name) hidden_def (name) @@ -585,7 +526,7 @@ for linking") # define rtld_hidden_data_ver(local, name) #endif -#if defined NOT_IN_libc && defined IS_IN_libm +#if IS_IN (libm) # define libm_hidden_proto(name, attrs...) hidden_proto (name, ##attrs) # define libm_hidden_tls_proto(name, attrs...) hidden_tls_proto (name, ##attrs) # define libm_hidden_def(name) hidden_def (name) @@ -605,7 +546,27 @@ for linking") # define libm_hidden_data_ver(local, name) #endif -#if defined NOT_IN_libc && defined IS_IN_libresolv +#if IS_IN (libmvec) +# define libmvec_hidden_proto(name, attrs...) hidden_proto (name, ##attrs) +# define libmvec_hidden_tls_proto(name, attrs...) hidden_tls_proto (name, ##attrs) +# define libmvec_hidden_def(name) hidden_def (name) +# define libmvec_hidden_weak(name) hidden_weak (name) +# define libmvec_hidden_ver(local, name) hidden_ver (local, name) +# define libmvec_hidden_data_def(name) hidden_data_def (name) +# define libmvec_hidden_data_weak(name) hidden_data_weak (name) +# define libmvec_hidden_data_ver(local, name) hidden_data_ver (local, name) +#else +# define libmvec_hidden_proto(name, attrs...) +# define libmvec_hidden_tls_proto(name, attrs...) +# define libmvec_hidden_def(name) +# define libmvec_hidden_weak(name) +# define libmvec_hidden_ver(local, name) +# define libmvec_hidden_data_def(name) +# define libmvec_hidden_data_weak(name) +# define libmvec_hidden_data_ver(local, name) +#endif + +#if IS_IN (libresolv) # define libresolv_hidden_proto(name, attrs...) hidden_proto (name, ##attrs) # define libresolv_hidden_tls_proto(name, attrs...) \ hidden_tls_proto (name, ##attrs) @@ -626,7 +587,7 @@ for linking") # define libresolv_hidden_data_ver(local, name) #endif -#if defined NOT_IN_libc && defined IS_IN_librt +#if IS_IN (librt) # define librt_hidden_proto(name, attrs...) hidden_proto (name, ##attrs) # define librt_hidden_tls_proto(name, attrs...) \ hidden_tls_proto (name, ##attrs) @@ -647,7 +608,7 @@ for linking") # define librt_hidden_data_ver(local, name) #endif -#if defined NOT_IN_libc && defined IS_IN_libdl +#if IS_IN (libdl) # define libdl_hidden_proto(name, attrs...) hidden_proto (name, ##attrs) # define libdl_hidden_tls_proto(name, attrs...) \ hidden_tls_proto (name, ##attrs) @@ -668,7 +629,7 @@ for linking") # define libdl_hidden_data_ver(local, name) #endif -#if defined NOT_IN_libc && defined IS_IN_libnss_files +#if IS_IN (libnss_files) # define libnss_files_hidden_proto(name, attrs...) hidden_proto (name, ##attrs) # define libnss_files_hidden_tls_proto(name, attrs...) \ hidden_tls_proto (name, ##attrs) @@ -689,7 +650,7 @@ for linking") # define libnss_files_hidden_data_ver(local, name) #endif -#if defined NOT_IN_libc && defined IS_IN_libnsl +#if IS_IN (libnsl) # define libnsl_hidden_proto(name, attrs...) hidden_proto (name, ##attrs) # define libnsl_hidden_tls_proto(name, attrs...) \ hidden_tls_proto (name, ##attrs) @@ -710,7 +671,7 @@ for linking") # define libnsl_hidden_data_ver(local, name) #endif -#if defined NOT_IN_libc && defined IS_IN_libnss_nisplus +#if IS_IN (libnss_nisplus) # define libnss_nisplus_hidden_proto(name, attrs...) hidden_proto (name, ##attrs) # define libnss_nisplus_hidden_tls_proto(name, attrs...) \ hidden_tls_proto (name, ##attrs) @@ -739,7 +700,7 @@ for linking") # define HIDDEN_BUILTIN_JUMPTARGET(name) HIDDEN_JUMPTARGET(name) #endif -#if defined NOT_IN_libc && defined IS_IN_libutil +#if IS_IN (libutil) # define libutil_hidden_proto(name, attrs...) hidden_proto (name, ##attrs) # define libutil_hidden_tls_proto(name, attrs...) \ hidden_tls_proto (name, ##attrs) |