Go to file
H.J. Lu ff6d62e9ed <sys/platform/x86.h>: Remove the C preprocessor magic
In <sys/platform/x86.h>, define CPU features as enum instead of using
the C preprocessor magic to make it easier to wrap this functionality
in other languages.  Move the C preprocessor magic to internal header
for better GCC codegen when more than one features are checked in a
single expression as in x86-64 dl-hwcaps-subdirs.c.

1. Rename COMMON_CPUID_INDEX_XXX to CPUID_INDEX_XXX.
2. Move CPUID_INDEX_MAX to sysdeps/x86/include/cpu-features.h.
3. Remove struct cpu_features and __x86_get_cpu_features from
<sys/platform/x86.h>.
4. Add __x86_get_cpuid_feature_leaf to <sys/platform/x86.h> and put it
in libc.
5. Make __get_cpu_features() private to glibc.
6. Replace __x86_get_cpu_features(N) with __get_cpu_features().
7. Add _dl_x86_get_cpu_features to GLIBC_PRIVATE.
8. Use a single enum index for each CPU feature detection.
9. Pass the CPUID feature leaf to __x86_get_cpuid_feature_leaf.
10. Return zero struct cpuid_feature for the older glibc binary with a
smaller CPUID_INDEX_MAX [BZ #27104].
11. Inside glibc, use the C preprocessor magic so that cpu_features data
can be loaded just once leading to more compact code for glibc.

256 bits are used for each CPUID leaf.  Some leaves only contain a few
features.  We can add exceptions to such leaves.  But it will increase
code sizes and it is harder to provide backward/forward compatibilities
when new features are added to such leaves in the future.

When new leaves are added, _rtld_global_ro offsets will change which
leads to race condition during in-place updates. We may avoid in-place
updates by

1. Rename the old glibc.
2. Install the new glibc.
3. Remove the old glibc.

NB: A function, __x86_get_cpuid_feature_leaf , is used to avoid the copy
relocation issue with IFUNC resolver as shown in IFUNC resolver tests.
2021-01-21 05:58:17 -08:00
ChangeLog.old
argp
assert
benchtests install: Replace scripts/output-format.sed with objdump -f [BZ #26559] 2021-01-11 12:03:36 -08:00
bits
catgets Update copyright dates not handled by scripts/update-copyrights. 2021-01-02 12:17:34 -08:00
conform
crypt
csu
ctype
debug Update copyright dates not handled by scripts/update-copyrights. 2021-01-02 12:17:34 -08:00
dirent
dlfcn
elf Use <startup.h> in __libc_init_secure 2021-01-19 09:55:47 -08:00
gmon
gnulib
grp
gshadow
hesiod
htl
hurd
iconv Update copyright dates not handled by scripts/update-copyrights. 2021-01-02 12:17:34 -08:00
iconvdata
include malloc: Add scratch_buffer_dupfree 2021-01-05 11:33:16 -03:00
inet
intl
io Update STATX_ATTR_DAX value from Linux 5.10. 2021-01-11 14:57:08 +00:00
libio
locale Update automatically-generated copyright dates 2021-01-02 12:17:34 -08:00
localedata POSIX locale: Fix typo in comment 2021-01-09 12:14:44 +01:00
login Update copyright dates not handled by scripts/update-copyrights. 2021-01-02 12:17:34 -08:00
mach
malloc malloc: Add scratch_buffer_dupfree 2021-01-05 11:33:16 -03:00
manual <sys/platform/x86.h>: Remove the C preprocessor magic 2021-01-21 05:58:17 -08:00
math math/test-tgmath2: Fix fabs failure when no long double 2021-01-15 11:24:04 +09:00
mathvec
misc mntent: Use __putc_unlocked instead of fputc_unlocked 2021-01-08 21:02:12 +05:30
nis
nptl nptl: Fix comment typo in pthread_cond_wait.c 2021-01-04 22:09:35 +01:00
nptl_db
nscd Update copyright dates not handled by scripts/update-copyrights. 2021-01-02 12:17:34 -08:00
nss Update copyright dates not handled by scripts/update-copyrights. 2021-01-02 12:17:34 -08:00
po
posix posix: Fix fnmatch.c on bootstrap 2021-01-20 13:23:33 -03:00
pwd
resolv
resource
rt
scripts install: Replace scripts/output-format.sed with objdump -f [BZ #26559] 2021-01-11 12:03:36 -08:00
setjmp
shadow
signal
socket
soft-fp
stdio-common
stdlib stdlib: Add testcase for BZ #26241 2021-01-20 11:13:53 -03:00
string
sunrpc
support posix: Fix return value of system if shell can not be executed [BZ #27053] 2021-01-11 12:26:58 -03:00
sysdeps <sys/platform/x86.h>: Remove the C preprocessor magic 2021-01-21 05:58:17 -08:00
sysvipc
termios
time
timezone
wcsmbs
wctype
.gitattributes
.gitignore
COPYING
COPYING.LIB
INSTALL
LICENSES
MAINTAINERS
Makeconfig
Makefile
Makefile.help
Makefile.in
Makerules Makerules: Do not require startup files for format.lds probe object 2021-01-12 12:22:47 +01:00
NEWS ld.so: Add --list-tunables to print tunable values 2021-01-15 05:59:10 -08:00
README
Rules
abi-tags
aclocal.m4
config.h.in x86: Support GNU_PROPERTY_X86_ISA_1_V[234] marker [BZ #26717] 2021-01-07 13:10:13 -08:00
config.make.in install: Replace scripts/output-format.sed with objdump -f [BZ #26559] 2021-01-11 12:03:36 -08:00
configure install: Replace scripts/output-format.sed with objdump -f [BZ #26559] 2021-01-11 12:03:36 -08:00
configure.ac install: Replace scripts/output-format.sed with objdump -f [BZ #26559] 2021-01-11 12:03:36 -08:00
extra-lib.mk
gen-locales.mk
libc-abis riscv: support GNU indirect function 2021-01-10 21:25:13 -05:00
libof-iterator.mk
o-iterator.mk
shlib-versions
test-skeleton.c
version.h

README

This directory contains the sources of the GNU C Library.
See the file "version.h" for what release version you have.

The GNU C Library is the standard system C library for all GNU systems,
and is an important part of what makes up a GNU system.  It provides the
system API for all programs written in C and C-compatible languages such
as C++ and Objective C; the runtime facilities of other programming
languages use the C library to access the underlying operating system.

In GNU/Linux systems, the C library works with the Linux kernel to
implement the operating system behavior seen by user applications.
In GNU/Hurd systems, it works with a microkernel and Hurd servers.

The GNU C Library implements much of the POSIX.1 functionality in the
GNU/Hurd system, using configurations i[4567]86-*-gnu.

When working with Linux kernels, this version of the GNU C Library
requires Linux kernel version 3.2 or later.

Also note that the shared version of the libgcc_s library must be
installed for the pthread library to work correctly.

The GNU C Library supports these configurations for using Linux kernels:

	aarch64*-*-linux-gnu
	alpha*-*-linux-gnu
	arc*-*-linux-gnu
	arm-*-linux-gnueabi
	csky-*-linux-gnuabiv2
	hppa-*-linux-gnu
	i[4567]86-*-linux-gnu
	x86_64-*-linux-gnu	Can build either x86_64 or x32
	ia64-*-linux-gnu
	m68k-*-linux-gnu
	microblaze*-*-linux-gnu
	mips-*-linux-gnu
	mips64-*-linux-gnu
	powerpc-*-linux-gnu	Hardware or software floating point, BE only.
	powerpc64*-*-linux-gnu	Big-endian and little-endian.
	s390-*-linux-gnu
	s390x-*-linux-gnu
	riscv32-*-linux-gnu
	riscv64-*-linux-gnu
	sh[34]-*-linux-gnu
	sparc*-*-linux-gnu
	sparc64*-*-linux-gnu

If you are interested in doing a port, please contact the glibc
maintainers; see https://www.gnu.org/software/libc/ for more
information.

See the file INSTALL to find out how to configure, build, and install
the GNU C Library.  You might also consider reading the WWW pages for
the C library at https://www.gnu.org/software/libc/.

The GNU C Library is (almost) completely documented by the Texinfo manual
found in the `manual/' subdirectory.  The manual is still being updated
and contains some known errors and omissions; we regret that we do not
have the resources to work on the manual as much as we would like.  For
corrections to the manual, please file a bug in the `manual' component,
following the bug-reporting instructions below.  Please be sure to check
the manual in the current development sources to see if your problem has
already been corrected.

Please see https://www.gnu.org/software/libc/bugs.html for bug reporting
information.  We are now using the Bugzilla system to track all bug reports.
This web page gives detailed information on how to report bugs properly.

The GNU C Library is free software.  See the file COPYING.LIB for copying
conditions, and LICENSES for notices about a few contributions that require
these additional notices to be distributed.  License copyright years may be
listed using range notation, e.g., 1996-2015, indicating that every year in
the range, inclusive, is a copyrightable year that would otherwise be listed
individually.