]> sourceware.org Git - glibc.git/log
glibc.git
3 years agonptl: Export __libc_multiple_threads from libc as an internal symbol
Florian Weimer [Mon, 10 May 2021 08:31:41 +0000 (10:31 +0200)]
nptl: Export __libc_multiple_threads from libc as an internal symbol

This allows the elimination of the __libc_multiple_threads_ptr
variable in libpthread and its initialization procedure.

Tested-by: Carlos O'Donell <carlos@redhat.com>
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
3 years agoelf, nptl: Resolve recursive lock implementation early
Florian Weimer [Mon, 10 May 2021 08:31:41 +0000 (10:31 +0200)]
elf, nptl: Resolve recursive lock implementation early

If libpthread is included in libc, it is not necessary to delay
initialization of the lock/unlock function pointers until libpthread
is loaded.  This eliminates two unprotected function pointers
from _rtld_global and removes some initialization code from
libpthread.

Tested-by: Carlos O'Donell <carlos@redhat.com>
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
3 years agoscripts/versions.awk: Add strings and hashes to <first-versions.h>
Florian Weimer [Mon, 10 May 2021 08:31:41 +0000 (10:31 +0200)]
scripts/versions.awk: Add strings and hashes to <first-versions.h>

This generates new macros of this from:

They are useful for symbol lookups using _dl_lookup_direct.

Tested-by: Carlos O'Donell <carlos@redhat.com>
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
3 years agoHurd: Add missing hidden proto definition for __ttyname_r
Florian Weimer [Mon, 10 May 2021 08:22:00 +0000 (10:22 +0200)]
Hurd: Add missing hidden proto definition for __ttyname_r

3 years agox86: Add EVEX optimized memchr family not safe for RTM
Noah Goldstein [Tue, 4 May 2021 23:02:40 +0000 (19:02 -0400)]
x86: Add EVEX optimized memchr family not safe for RTM

No bug.

This commit adds a new implementation for EVEX memchr that is not safe
for RTM because it uses vzeroupper. The benefit is that by using
ymm0-ymm15 it can use vpcmpeq and vpternlogd in the 4x loop which is
faster than the RTM safe version which cannot use vpcmpeq because
there is no EVEX encoding for the instruction. All parts of the
implementation aside from the 4x loop are the same for the two
versions and the optimization is only relevant for large sizes.

Tigerlake:
size  , algn  , Pos   , Cur T , New T , Win     , Dif
512   , 6     , 192   , 9.2   , 9.04  , no-RTM  , 0.16
512   , 7     , 224   , 9.19  , 8.98  , no-RTM  , 0.21
2048  , 0     , 256   , 10.74 , 10.54 , no-RTM  , 0.2
2048  , 0     , 512   , 14.81 , 14.87 , RTM     , 0.06
2048  , 0     , 1024  , 22.97 , 22.57 , no-RTM  , 0.4
2048  , 0     , 2048  , 37.49 , 34.51 , no-RTM  , 2.98   <--

Icelake:
size  , algn  , Pos   , Cur T , New T , Win     , Dif
512   , 6     , 192   , 7.6   , 7.3   , no-RTM  , 0.3
512   , 7     , 224   , 7.63  , 7.27  , no-RTM  , 0.36
2048  , 0     , 256   , 8.48  , 8.38  , no-RTM  , 0.1
2048  , 0     , 512   , 11.57 , 11.42 , no-RTM  , 0.15
2048  , 0     , 1024  , 17.92 , 17.38 , no-RTM  , 0.54
2048  , 0     , 2048  , 30.37 , 27.34 , no-RTM  , 3.03   <--

test-memchr, test-wmemchr, and test-rawmemchr are all passing.

Signed-off-by: Noah Goldstein <goldstein.w.n@gmail.com>
Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
3 years agox86-64: Fix an unknown vector operation in memchr-evex.S
Alice Xu [Sat, 8 May 2021 02:03:21 +0000 (19:03 -0700)]
x86-64: Fix an unknown vector operation in memchr-evex.S

An unknown vector operation occurred in commit 2a76821c308. Fixed it
by using "ymm{k1}{z}" but not "ymm {k1} {z}".

Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
3 years agopowerpc64le: Fix ifunc selection for memset, memmove, bzero and bcopy
Raoni Fassina Firmino [Mon, 3 May 2021 19:59:35 +0000 (16:59 -0300)]
powerpc64le: Fix ifunc selection for memset, memmove, bzero and bcopy

The hwcap2 check for the aforementioned functions should check for
both PPC_FEATURE2_ARCH_3_1 and PPC_FEATURE2_HAS_ISEL but was
mistakenly checking for any one of them, enabling isa 3.1 version of
the functions in incompatible processors, like POWER8.

Reviewed-by: Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
3 years agomalloc: Make tunable callback functions static
H.J. Lu [Fri, 7 May 2021 01:18:48 +0000 (18:18 -0700)]
malloc: Make tunable callback functions static

Since malloc tunable callback functions are only used within the same
file, we should make them static.

3 years agolinux: implement ttyname as a wrapper around ttyname_r.
Érico Nogueira [Tue, 4 May 2021 01:51:52 +0000 (22:51 -0300)]
linux: implement ttyname as a wrapper around ttyname_r.

Big win in binary size and avoids duplicating the logic in multiple
places.

On x86_64, dropped from 1883206 to 1881790, a 1416 byte decrease.

Also changed logic to track if ttyname_buf has been allocated by
checking if it's NULL instead of tracking buflen as an additional
variable.

Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
3 years agolinux: use fd_to_filename instead of _fitoa_word in ttyname_r.
Érico Nogueira [Tue, 4 May 2021 01:51:51 +0000 (22:51 -0300)]
linux: use fd_to_filename instead of _fitoa_word in ttyname_r.

Simplifies the logic and makes intent clearer, while at the same time
decreasing binary size.

On x86_64, dropped from 1883270 to 1883206, a 64 byte decrease.

Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
3 years agomisc: use _fitoa_word to implement __fd_to_filename.
Érico Nogueira [Tue, 4 May 2021 01:51:50 +0000 (22:51 -0300)]
misc: use _fitoa_word to implement __fd_to_filename.

In a default build for x86_64, size decreased by 24 bytes:
1883294 to 1883270.

Aditionally, avoids repeating the number printing logic in multiple
places.

Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
3 years agolinux: Remove /proc/cpuinfo fallback on alpha and sparc
Adhemerval Zanella [Thu, 25 Mar 2021 17:04:37 +0000 (14:04 -0300)]
linux: Remove /proc/cpuinfo fallback on alpha and sparc

There is no much gain in fallback to cpuinfo if sysfs is no present,
usually on restricted environment neither will be present.  It also
simplifies the code and make all architecture use the sched_getaffinity
as the sysfs fallback.

Checked on sparc64-linux-gnu.

3 years agolinux: Use sched_getaffinity for __get_nprocs (BZ #27645)
Adhemerval Zanella [Thu, 25 Mar 2021 12:30:07 +0000 (09:30 -0300)]
linux: Use sched_getaffinity for __get_nprocs (BZ #27645)

Both the sysfs and procfs parsing (through GET_NPROCS_PARSER) are
removed in favor the syscall.  The initial scratch buffer should
fit to most of the common usage (1024 bytes with maps to 8192 CPUs).

Checked on x86_64-linux-gnu and aarch64-linux-gnu.

3 years agoRemove architecture specific sched_cpucount optimizations
Adhemerval Zanella [Wed, 24 Mar 2021 21:56:34 +0000 (18:56 -0300)]
Remove architecture specific sched_cpucount optimizations

And replace the generic algorithm with the Brian Kernighan's one.
GCC optimize it with popcnt if the architecture supports, so there
is no need to add the extra POPCNT define to enable it.

This is really a micro-optimization that only adds complexity:
recent ABIs already support it (x86-64-v2 or power64le) and it
simplifies the code for internal usage, since i686 does not allow an
internal iFUNC call.

Checked on x86_64-linux-gnu, aarch64-linux-gnu, and
powerpc64le-linux-gnu.

3 years agoRun $(objpfx)iconvconfig with $(run-program-prefix) [BZ #27477]
H.J. Lu [Fri, 26 Feb 2021 21:07:18 +0000 (13:07 -0800)]
Run $(objpfx)iconvconfig with $(run-program-prefix) [BZ #27477]

When glibc is configured with --enable-hardcoded-path-in-tests,
"make xcheck" failed with

...
env GCONV_PATH=/export/build/gnu/tools-build/glibc-cet-gitlab/build-x86_64-linux/iconvdata LOCPATH=/export/build/gnu/tools-build/glibc-cet-gitlab/build-x86_64-linux/localedata LC_ALL=C  /export/build/gnu/tools-build/glibc-cet-gitlab/build-x86_64-linux/iconv/iconvconfig  --output=$tmp --nostdlib /usr/lib64/gconv;
...
/export/build/gnu/tools-build/glibc-cet-gitlab/build-x86_64-linux/iconv/iconvconfig: /lib64/libc.so.6: version `GLIBC_2.34' not found (required by /export/build/gnu/tools-build/glibc-cet-gitlab/build-x86_64-linux/iconv/iconvconfig)
...
FAIL: iconv/test-iconvconfig

Since $(objpfx)iconvconfig is an installed program, run it with
$(run-program-prefix).

3 years agoUse the correct diagnostic macro.
Martin Sebor [Thu, 6 May 2021 19:38:44 +0000 (13:38 -0600)]
Use the correct diagnostic macro.

3 years agoAnnotate additional APIs with GCC attribute access.
Martin Sebor [Thu, 6 May 2021 16:56:25 +0000 (10:56 -0600)]
Annotate additional APIs with GCC attribute access.

This change continues the improvements to compile-time out of bounds
checking by decorating more APIs with either attribute access, or by
explicitly providing the array bound in APIs such as tmpnam() that
expect arrays of some minimum size as arguments.  (The latter feature
is new in GCC 11.)

The only effects of the attribute and/or the array bound is to check
and diagnose calls to the functions that fail to provide a sufficient
number of elements, and the definitions of the functions that access
elements outside the specified bounds.  (There is no interplay with
_FORTIFY_SOURCE here yet.)

Tested with GCC 7 through 11 on x86_64-linux.

3 years agonptl: Move pthread_barrierattr_setpshared into libc
Florian Weimer [Thu, 6 May 2021 13:56:37 +0000 (15:56 +0200)]
nptl: Move pthread_barrierattr_setpshared into libc

The symbol was moved using scripts/move-symbol-to-libc.py.

Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
3 years agonptl: Move pthread_barrierattr_getpshared into libc
Florian Weimer [Thu, 6 May 2021 13:56:37 +0000 (15:56 +0200)]
nptl: Move pthread_barrierattr_getpshared into libc

The symbol was moved using scripts/move-symbol-to-libc.py.

Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
3 years agonptl: Move pthread_barrierattr_init into libc
Florian Weimer [Thu, 6 May 2021 13:56:37 +0000 (15:56 +0200)]
nptl: Move pthread_barrierattr_init into libc

The symbol was moved using scripts/move-symbol-to-libc.py.

Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
3 years agonptl: Move pthread_barrierattr_destroy into libc
Florian Weimer [Thu, 6 May 2021 13:56:37 +0000 (15:56 +0200)]
nptl: Move pthread_barrierattr_destroy into libc

The symbol was moved using scripts/move-symbol-to-libc.py.

Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
3 years agonptl: Move pthread_barrier_wait into libc
Florian Weimer [Thu, 6 May 2021 13:56:37 +0000 (15:56 +0200)]
nptl: Move pthread_barrier_wait into libc

The symbol was moved using scripts/move-symbol-to-libc.py.

Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
3 years agonptl: Move pthread_barrier_init into libc
Florian Weimer [Thu, 6 May 2021 13:56:37 +0000 (15:56 +0200)]
nptl: Move pthread_barrier_init into libc

The symbol was moved using scripts/move-symbol-to-libc.py.

Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
3 years agonptl: Move pthread_barrier_destroy into libc
Florian Weimer [Thu, 6 May 2021 13:56:37 +0000 (15:56 +0200)]
nptl: Move pthread_barrier_destroy into libc

The symbol was moved using scripts/move-symbol-to-libc.py.

Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
3 years agonptl: Move sem_trywait, sem_wait into libc
Florian Weimer [Wed, 5 May 2021 15:15:57 +0000 (17:15 +0200)]
nptl: Move sem_trywait, sem_wait into libc

The symbols were moved using scripts/move-symbol-to-libc.py.

Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
3 years agonptl: Move sem_unlink into libc
Florian Weimer [Wed, 5 May 2021 15:15:57 +0000 (17:15 +0200)]
nptl: Move sem_unlink into libc

The symbol was moved using scripts/move-symbol-to-libc.py.

A small adjust to the sem_unlink implementation is necessary to avoid
a check-localplt failure.

A placeholder symbol to keep the GLIBC_2.1.1 version alive in
libpthread is added with this commit.

Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
3 years agonptl: Move sem_timedwait into libc
Florian Weimer [Wed, 5 May 2021 15:15:57 +0000 (17:15 +0200)]
nptl: Move sem_timedwait into libc

The symbol was moved using scripts/move-symbol-to-libc.py.

Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
3 years agonptl: Move sem_post into libc
Florian Weimer [Wed, 5 May 2021 15:15:57 +0000 (17:15 +0200)]
nptl: Move sem_post into libc

The symbol was moved using scripts/move-symbol-to-libc.py.

Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
3 years agonptl: Move sem_init into libc
Florian Weimer [Wed, 5 May 2021 15:15:57 +0000 (17:15 +0200)]
nptl: Move sem_init into libc

The symbol was moved using scripts/move-symbol-to-libc.py.

Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
3 years agonptl: Move sem_getvalue into libc
Florian Weimer [Wed, 5 May 2021 15:15:57 +0000 (17:15 +0200)]
nptl: Move sem_getvalue into libc

The symbol was moved using scripts/move-symbol-to-libc.py.

Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
3 years agonptl: Move sem_destroy into libc
Florian Weimer [Wed, 5 May 2021 15:15:57 +0000 (17:15 +0200)]
nptl: Move sem_destroy into libc

The symbol was moved using scripts/move-symbol-to-libc.py.

Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
3 years agonptl: Move sem_close, sem_open into libc
Florian Weimer [Wed, 5 May 2021 15:15:57 +0000 (17:15 +0200)]
nptl: Move sem_close, sem_open into libc

The symbols were moved using move-symbol-to-libc.py.

Both functions are moved at the same time because they depend
on internal functions in sysdeps/pthread/sem_routines.c, which
are moved in this commit as well.  Additional hidden prototypes
are required to avoid check-localplt failures.

Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
3 years agonptl: Move sem_clockwait into libc
Florian Weimer [Wed, 5 May 2021 15:15:57 +0000 (17:15 +0200)]
nptl: Move sem_clockwait into libc

The symbol was moved using scripts/move-symbol-to-libc.py.

A new placeholder version is added at version GLIBC_2.30, to
preserve that version in libpthread.so.0.

Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
3 years agonptl: Consolidate async cancel enable/disable implementation in libc
Florian Weimer [Wed, 5 May 2021 15:15:57 +0000 (17:15 +0200)]
nptl: Consolidate async cancel enable/disable implementation in libc

Previously, the source file nptl/cancellation.c was compiled multiple
times, for libc, libpthread, librt.  This commit switches to a single
implementation, with new __pthread_enable_asynccancel@@GLIBC_PRIVATE,
__pthread_disable_asynccancel@@GLIBC_PRIVATE exports.

The almost-unused CANCEL_ASYNC and CANCEL_RESET macros are replaced
by LIBC_CANCEL_ASYNC and LIBC_CANCEL_ASYNC macros.  They call the
__pthread_* functions unconditionally now.  The macros are still
needed because shared code uses them; Hurd has different definitions.

Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
3 years agonptl: Move pthread_testcancel into libc
Florian Weimer [Wed, 5 May 2021 15:15:57 +0000 (17:15 +0200)]
nptl: Move pthread_testcancel into libc

The symbol was moved using scripts/move-symbol-to-libc.py.

A temporary __pthread_testcancel@@GLIBC_PRIVATE export is created
because it is needed by the semaphore implementation.

Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
3 years agoelf, nptl: Initialize static TLS directly in ld.so
Florian Weimer [Wed, 5 May 2021 04:20:31 +0000 (06:20 +0200)]
elf, nptl: Initialize static TLS directly in ld.so

The stack list is available in ld.so since commit
1daccf403b1bd86370eb94edca794dc106d02039 ("nptl: Move stack list
variables into _rtld_global"), so it's possible to walk the stack
list directly in ld.so and perform the initialization there.

This eliminates an unprotected function pointer from _rtld_global
and reduces the libpthread initialization code.

3 years agoposix: Fix Hurd build failure in tst-execveat
Florian Weimer [Tue, 4 May 2021 13:52:58 +0000 (15:52 +0200)]
posix: Fix Hurd build failure in tst-execveat

This avoids a -Werror compilation failure due to unused local
variables.

3 years agox86: Optimize memchr-evex.S
Noah Goldstein [Mon, 3 May 2021 07:03:19 +0000 (03:03 -0400)]
x86: Optimize memchr-evex.S

No bug. This commit optimizes memchr-evex.S. The optimizations include
replacing some branches with cmovcc, avoiding some branches entirely
in the less_4x_vec case, making the page cross logic less strict,
saving some ALU in the alignment process, and most importantly
increasing ILP in the 4x loop. test-memchr, test-rawmemchr, and
test-wmemchr are all passing.

Signed-off-by: Noah Goldstein <goldstein.w.n@gmail.com>
Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
3 years agox86: Optimize memchr-avx2.S
Noah Goldstein [Mon, 3 May 2021 07:01:58 +0000 (03:01 -0400)]
x86: Optimize memchr-avx2.S

No bug. This commit optimizes memchr-avx2.S. The optimizations include
replacing some branches with cmovcc, avoiding some branches entirely
in the less_4x_vec case, making the page cross logic less strict,
asaving a few instructions the in loop return loop. test-memchr,
test-rawmemchr, and test-wmemchr are all passing.

Signed-off-by: Noah Goldstein <goldstein.w.n@gmail.com>
Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
3 years agolinux: use __fd_to_filename helper function instead of snprintf.
Érico Nogueira [Tue, 27 Apr 2021 13:09:45 +0000 (10:09 -0300)]
linux: use __fd_to_filename helper function instead of snprintf.

Change made to fchmodat and fexecve. There are tests using xasprintf
instead of this helper as well, but this commit doesn't touch them.

3 years agolinux: Add execveat system call wrapper
Alexandra Hájková [Mon, 3 May 2021 16:35:10 +0000 (16:35 +0000)]
linux: Add execveat system call wrapper

It operates similar to execve and it is is already used to implement
fexecve without requiring /proc to be mounted.  However, different
than fexecve, if the syscall is not supported by the kernel an error
is returned instead of trying a fallback.

Checked on x86_64-linux-gnu and powerpc64le-linux-gnu.

Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
3 years agoBench: Expand bench-memchr.c
Noah Goldstein [Mon, 3 May 2021 08:44:35 +0000 (04:44 -0400)]
Bench: Expand bench-memchr.c

No bug. This commit adds some additional cases for bench-memchr.c
including testing medium sizes and testing short length with both an
inbound match and out of bound match.

Signed-off-by: Noah Goldstein <goldstein.w.n@gmail.com>
3 years agolocale: Align _nl_C_LC_CTYPE_class and _nl_C_LC_CTYPE_class32
Lirong Yuan [Thu, 1 Apr 2021 19:37:23 +0000 (12:37 -0700)]
locale: Align _nl_C_LC_CTYPE_class and _nl_C_LC_CTYPE_class32

Otherwise, programs that use character classification macros such as
isspace may observe unaligned pointers.

3 years agonptl: Re-sort Versions file
Florian Weimer [Mon, 3 May 2021 12:12:55 +0000 (14:12 +0200)]
nptl: Re-sort Versions file

Due to an incorrect conflict resolution, libc/GLIBC_2.2 section was no
longer sorted lexicographically.

3 years agox86: Set rep_movsb_threshold to 2112 on processors with FSRM
H.J. Lu [Fri, 30 Apr 2021 12:58:59 +0000 (05:58 -0700)]
x86: Set rep_movsb_threshold to 2112 on processors with FSRM

The glibc memcpy benchmark on Intel Core i7-1065G7 (Ice Lake) showed
that REP MOVSB became faster after 2112 bytes:

                                      Vector Move       REP MOVSB
length=2112, align1=0, align2=0:        24.20             24.40
length=2112, align1=1, align2=0:        26.07             23.13
length=2112, align1=0, align2=1:        27.18             28.13
length=2112, align1=1, align2=1:        26.23             25.16
length=2176, align1=0, align2=0:        23.18             22.52
length=2176, align1=2, align2=0:        25.45             22.52
length=2176, align1=0, align2=2:        27.14             27.82
length=2176, align1=2, align2=2:        22.73             25.56
length=2240, align1=0, align2=0:        24.62             24.25
length=2240, align1=3, align2=0:        29.77             27.15
length=2240, align1=0, align2=3:        35.55             29.93
length=2240, align1=3, align2=3:        34.49             25.15
length=2304, align1=0, align2=0:        34.75             26.64
length=2304, align1=4, align2=0:        32.09             22.63
length=2304, align1=0, align2=4:        28.43             31.24

Use REP MOVSB for data size > 2112 bytes in memcpy on processors with
fast short REP MOVSB (FSRM).

* sysdeps/x86/dl-cacheinfo.h (dl_init_cacheinfo): Set
rep_movsb_threshold to 2112 on processors with fast short REP
MOVSB (FSRM).

3 years agobench-memcpy: Collect data from 2KB to 4KB
H.J. Lu [Fri, 30 Apr 2021 17:10:47 +0000 (10:10 -0700)]
bench-memcpy: Collect data from 2KB to 4KB

Collect data on memcpy from 2KB to 4KB with the 64-byte increment value.

3 years agostdio: fix vfscanf with matches longer than INT_MAX (bug 27650)
Alyssa Ross [Mon, 3 May 2021 08:34:11 +0000 (10:34 +0200)]
stdio: fix vfscanf with matches longer than INT_MAX (bug 27650)

Patterns like %*[ can safely be used to match a great many characters,
and it's quite realisitic to use them for more than INT_MAX characters
from an IO stream.

With the previous approach, after INT_MAX characters (v)fscanf would
return successfully, indicating an end to the match, even though there
wasn't one.

3 years agonptl: Move pthread_yield into libc, as a compatibility symbol
Florian Weimer [Mon, 3 May 2021 07:23:17 +0000 (09:23 +0200)]
nptl: Move pthread_yield into libc, as a compatibility symbol

And deprecate it in <pthread.h>, redirecting it to sched_yield
for the time being.

The symbol was moved using scripts/move-symbol-to-libc.py.

No GLIBC_2.34 symbol version is added because of the compatibility
symbol status.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Tested-by: Carlos O'Donell <carlos@redhat.com>
3 years agonptl: Move pthread_rwlockattr_setpshared into libc
Florian Weimer [Mon, 3 May 2021 07:10:57 +0000 (09:10 +0200)]
nptl: Move pthread_rwlockattr_setpshared into libc

The symbol was moved using scripts/move-symbol-to-libc.py.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Tested-by: Carlos O'Donell <carlos@redhat.com>
3 years agonptl: Move pthread_rwlockattr_setkind_np into libc
Florian Weimer [Mon, 3 May 2021 07:10:57 +0000 (09:10 +0200)]
nptl: Move pthread_rwlockattr_setkind_np into libc

The symbol was moved using scripts/move-symbol-to-libc.py.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Tested-by: Carlos O'Donell <carlos@redhat.com>
3 years agonptl: Move pthread_rwlockattr_init into libc
Florian Weimer [Mon, 3 May 2021 07:10:57 +0000 (09:10 +0200)]
nptl: Move pthread_rwlockattr_init into libc

The symbol was moved using scripts/move-symbol-to-libc.py.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Tested-by: Carlos O'Donell <carlos@redhat.com>
3 years agonptl: Move pthread_rwlockattr_getpshared into libc
Florian Weimer [Mon, 3 May 2021 07:10:57 +0000 (09:10 +0200)]
nptl: Move pthread_rwlockattr_getpshared into libc

The symbol was moved using scripts/move-symbol-to-libc.py.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Tested-by: Carlos O'Donell <carlos@redhat.com>
3 years agonptl: Move pthread_rwlockattr_getkind_np into libc
Florian Weimer [Mon, 3 May 2021 07:10:57 +0000 (09:10 +0200)]
nptl: Move pthread_rwlockattr_getkind_np into libc

The symbol was moved using scripts/move-symbol-to-libc.py.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Tested-by: Carlos O'Donell <carlos@redhat.com>
3 years agonptl: Move pthread_rwlockattr_destroy into libc
Florian Weimer [Mon, 3 May 2021 07:10:57 +0000 (09:10 +0200)]
nptl: Move pthread_rwlockattr_destroy into libc

The symbol was moved using scripts/move-symbol-to-libc.py.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Tested-by: Carlos O'Donell <carlos@redhat.com>
3 years agonptl: Move pthread_rwlock_trywrlock into libc
Florian Weimer [Mon, 3 May 2021 07:10:57 +0000 (09:10 +0200)]
nptl: Move pthread_rwlock_trywrlock into libc

And __pthread_rwlock_trywrlock as a compatibility symbol.

Remove the unused __libc_rwlock_trywrlock macro.

The symbols were moved using scripts/move-symbol-to-libc.py.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Tested-by: Carlos O'Donell <carlos@redhat.com>
3 years agonptl: Move pthread_rwlock_tryrdlock into libc
Florian Weimer [Mon, 3 May 2021 07:10:57 +0000 (09:10 +0200)]
nptl: Move pthread_rwlock_tryrdlock into libc

And __pthread_rwlock_tryrdlock as a compatibility symbol.

Remove the unused __libc_rwlock_tryrdlock macro.

The symbols were moved using scripts/move-symbol-to-libc.py.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Tested-by: Carlos O'Donell <carlos@redhat.com>
3 years agonptl: Move pthread_rwlock_timedwrlock into libc
Florian Weimer [Mon, 3 May 2021 07:10:57 +0000 (09:10 +0200)]
nptl: Move pthread_rwlock_timedwrlock into libc

The symbol was moved using scripts/move-symbol-to-libc.py.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Tested-by: Carlos O'Donell <carlos@redhat.com>
3 years agonptl: Move pthread_rwlock_timedrdlock into libc
Florian Weimer [Mon, 3 May 2021 07:10:57 +0000 (09:10 +0200)]
nptl: Move pthread_rwlock_timedrdlock into libc

The symbol was moved using scripts/move-symbol-to-libc.py.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Tested-by: Carlos O'Donell <carlos@redhat.com>
3 years agonptl: Move pthread_rwlock_init into libc
Florian Weimer [Mon, 3 May 2021 07:10:57 +0000 (09:10 +0200)]
nptl: Move pthread_rwlock_init into libc

And __pthread_rwlock_init as a compatibility symbol.

__libc_rwlock_init is changed to call __pthread_rwlock_init directly.

The symbols were moved using scripts/move-symbol-to-libc.py.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Tested-by: Carlos O'Donell <carlos@redhat.com>
3 years agonptl: Move pthread_rwlock_destroy into libc
Florian Weimer [Mon, 3 May 2021 07:10:57 +0000 (09:10 +0200)]
nptl: Move pthread_rwlock_destroy into libc

And __pthread_rwlock_destroy as a compatibility symbol.

rwlocks do not need finalization, so change __libc_rwlock_fini to do
nothing.

The symbols were moved using scripts/move-symbol-to-libc.py.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Tested-by: Carlos O'Donell <carlos@redhat.com>
3 years agonptl: Move pthread_rwlock_clockwrlock into libc
Florian Weimer [Mon, 3 May 2021 07:10:57 +0000 (09:10 +0200)]
nptl: Move pthread_rwlock_clockwrlock into libc

The symbol was moved using scripts/move-symbol-to-libc.py.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Tested-by: Carlos O'Donell <carlos@redhat.com>
3 years agonptl: Move pthread_rwlock_clockrdlock into libc
Florian Weimer [Mon, 3 May 2021 07:10:57 +0000 (09:10 +0200)]
nptl: Move pthread_rwlock_clockrdlock into libc

The symbol was moved using scripts/move-symbol-to-libc.py.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Tested-by: Carlos O'Donell <carlos@redhat.com>
3 years agonptl: Move tss_set into libc
Florian Weimer [Mon, 3 May 2021 06:12:12 +0000 (08:12 +0200)]
nptl: Move tss_set into libc

The symbol was moved using scripts/move-symbol-to-libc.py.

__pthread_setspecific@@GLIBC_2.34 is no longer needed after the move,
so it is removed with this commit, too.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Tested-by: Carlos O'Donell <carlos@redhat.com>
3 years agonptl: Move tss_get into libc
Florian Weimer [Mon, 3 May 2021 06:12:12 +0000 (08:12 +0200)]
nptl: Move tss_get into libc

The symbol was moved using scripts/move-symbol-to-libc.py.

__pthread_getspecific@@GLIBC_2.34 is no longer needed after the move,
so it is removed with this commit, too.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Tested-by: Carlos O'Donell <carlos@redhat.com>
3 years agonptl: Move tss_delete into libc
Florian Weimer [Mon, 3 May 2021 06:12:12 +0000 (08:12 +0200)]
nptl: Move tss_delete into libc

The symbol was moved using scripts/move-symbol-to-libc.py.

__pthread_key_delete@@GLIBC_PRIVATE is no longer needed after that,
so it is removed as well.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Tested-by: Carlos O'Donell <carlos@redhat.com>
3 years agonptl: Move tss_create into libc
Florian Weimer [Mon, 3 May 2021 06:12:12 +0000 (08:12 +0200)]
nptl: Move tss_create into libc

The symbol was moved using scripts/move-symbol-to-libc.py.

__pthread_key_create@@GLIBC_2.34 is no longer needed by glibc
itself with this change, but __pthread_key_create is used by
libstdc++, so it still has to be exported as a public symbol.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Tested-by: Carlos O'Donell <carlos@redhat.com>
3 years agonptl: Move thrd_exit into libc
Florian Weimer [Mon, 3 May 2021 06:12:12 +0000 (08:12 +0200)]
nptl: Move thrd_exit into libc

The symbol was moved using scripts/move-symbol-to-libc.py.

The __pthread_exit@@GLIBC_PRIVATE symbol is no longer needed
after this change, so remove it.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Tested-by: Carlos O'Donell <carlos@redhat.com>
3 years agonptl: Move mtx_unlock into libc
Florian Weimer [Mon, 3 May 2021 06:12:12 +0000 (08:12 +0200)]
nptl: Move mtx_unlock into libc

The symbol was moved using scripts/move-symbol-to-libc.py.

__pthread_mutex_unlock@GLIBC_2.34 is not removed in this commit
because it is still used from nptl/nptl-init.c.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Tested-by: Carlos O'Donell <carlos@redhat.com>
3 years agonptl: Move mtx_trylock into libc
Florian Weimer [Mon, 3 May 2021 06:12:11 +0000 (08:12 +0200)]
nptl: Move mtx_trylock into libc

The symbol was moved using scripts/move-symbol-to-libc.py.

The __pthread_mutex_trylock@@GLIBC_2.34 symbol version is no longer
needed because the call is now internal to libc, so remove it with
this commit.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Tested-by: Carlos O'Donell <carlos@redhat.com>
3 years agonptl: Move mtx_timedlock into libc
Florian Weimer [Mon, 3 May 2021 06:12:11 +0000 (08:12 +0200)]
nptl: Move mtx_timedlock into libc

The symbol was moved using scripts/move-symbol-to-libc.py.

The __pthread_mutex_timedlock@@GLIBC_PRIVATE export is no longer
needed, so it is removed with this commit.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Tested-by: Carlos O'Donell <carlos@redhat.com>
3 years agonptl: Move mtx_lock into libc
Florian Weimer [Mon, 3 May 2021 06:12:11 +0000 (08:12 +0200)]
nptl: Move mtx_lock into libc

The symbol was moved using scripts/move-symbol-to-libc.py.

__pthread_mutex_lock@GLIBC_2.34 is not removed in this commit
because it is still used from nptl/nptl-init.c.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Tested-by: Carlos O'Donell <carlos@redhat.com>
3 years agonptl: Move mtx_init into libc
Florian Weimer [Mon, 3 May 2021 06:12:11 +0000 (08:12 +0200)]
nptl: Move mtx_init into libc

The symbol was moved using scripts/move-symbol-to-libc.py.

The calls to __pthread_mutex_init, __pthread_mutexattr_init,
__pthread_mutexattr_settype are now private and no longer need
to be exported.  This allows the removal of the newly added
GLIBC_2.34 symbol versions for those functions.

Also clean up some weak declarations in <libc-lockP.h> for
these functions.  They are not needed and potentially incorrect
for static linking of mtx_init.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Tested-by: Carlos O'Donell <carlos@redhat.com>
3 years agonptl: Move mtx_destroy into libc
Florian Weimer [Mon, 3 May 2021 06:12:11 +0000 (08:12 +0200)]
nptl: Move mtx_destroy into libc

The symbol was moved using scripts/move-symbol-to-libc.py.

The __pthread_mutex_destroy@@GLIBC_2.34 symbol is no longer
neded because this commit makes __pthread_mutex_destroy@GLIBC_2.0
a compatibility symbol, so remove the new symbol version.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Tested-by: Carlos O'Donell <carlos@redhat.com>
3 years agonptl: Move cnd_wait into libc
Florian Weimer [Mon, 3 May 2021 06:12:11 +0000 (08:12 +0200)]
nptl: Move cnd_wait into libc

The symbol was moved using scripts/move-symbol-to-libc.py.

The __pthread_cond_wait@@GLIBC_PRIVATE symbol is no longer
neded, so remove that as well.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Tested-by: Carlos O'Donell <carlos@redhat.com>
3 years agonptl: Move cnd_timedwait into libc
Florian Weimer [Mon, 3 May 2021 06:12:11 +0000 (08:12 +0200)]
nptl: Move cnd_timedwait into libc

The symbol was moved using scripts/move-symbol-to-libc.py.

The __pthread_cond_timedwait@@GLIBC_PRIVATE symbol is no longer
neded, so remove that as well.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Tested-by: Carlos O'Donell <carlos@redhat.com>
3 years agonptl: Move cnd_signal into libc
Florian Weimer [Mon, 3 May 2021 06:12:11 +0000 (08:12 +0200)]
nptl: Move cnd_signal into libc

The symbol was moved using scripts/move-symbol-to-libc.py.

The __pthread_cond_signal@@GLIBC_PRIVATE symbol is no longer
neded, so remove that as well.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Tested-by: Carlos O'Donell <carlos@redhat.com>
3 years agonptl: Move cnd_init into libc
Florian Weimer [Mon, 3 May 2021 06:12:11 +0000 (08:12 +0200)]
nptl: Move cnd_init into libc

The symbol was moved using scripts/move-symbol-to-libc.py.

The __pthread_cond_init@@GLIBC_PRIVATE symbol is no longer
neded, so remove that as well.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Tested-by: Carlos O'Donell <carlos@redhat.com>
3 years agonptl: Move cnd_destroy into libc
Florian Weimer [Mon, 3 May 2021 06:12:11 +0000 (08:12 +0200)]
nptl: Move cnd_destroy into libc

The symbol was moved using scripts/move-symbol-to-libc.py.

The __pthread_cond_destroy@@GLIBC_PRIVATE symbol is no longer
neded, so remove that as well.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Tested-by: Carlos O'Donell <carlos@redhat.com>
3 years agonptl: Move cnd_broadcast into libc
Florian Weimer [Mon, 3 May 2021 06:12:11 +0000 (08:12 +0200)]
nptl: Move cnd_broadcast into libc

The symbol was moved using scripts/move-symbol-to-libc.py.

The __pthread_cond_broadcast@@GLIBC_PRIVATE symbol is no longer
neded, so remove that as well.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Tested-by: Carlos O'Donell <carlos@redhat.com>
3 years agonptl: Move call_once into libc
Florian Weimer [Mon, 3 May 2021 06:12:11 +0000 (08:12 +0200)]
nptl: Move call_once into libc

The symbol was moved using scripts/move-symbol-to-libc.py.

This change also turns __pthread_once into a compatibility symbol
because after the call_once move, an internal call to __pthread_once
can be used.  This an adjustment to __libc_once: Outside libc (e.g.,
in nscd), it has to call pthread_once.  With __pthread_once as a
compatibility symbol, it is no longer to add a new GLIBC_2.34
version after the move from libpthread, and this commit removes
the new __pthread_once@@GLIBC_2.34 version.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Tested-by: Carlos O'Donell <carlos@redhat.com>
3 years agoAdd pthread-in-libc, libpthread-routines-var, librt-routines-var
Florian Weimer [Mon, 3 May 2021 06:12:11 +0000 (08:12 +0200)]
Add pthread-in-libc, libpthread-routines-var, librt-routines-var

These make variables can be used to add routines to different
libraries for the Hurd and Linux builds.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Tested-by: Carlos O'Donell <carlos@redhat.com>
3 years agopowerpc64le: Optimize memset for POWER10
Raoni Fassina Firmino [Fri, 30 Apr 2021 21:12:08 +0000 (18:12 -0300)]
powerpc64le: Optimize memset for POWER10

This implementation is based on __memset_power8 and integrates a lot
of suggestions from Anton Blanchard.

The biggest difference is that it makes extensive use of stxvl to
alignment and tail code to avoid branches and small stores.  It has
three main execution paths:

a) "Short lengths" for lengths up to 64 bytes, avoiding as many
   branches as possible.

b) "General case" for larger lengths, it has an alignment section
   using stxvl to avoid branches, a 128 bytes loop and then a tail
   code, again using stxvl with few branches.

c) "Zeroing cache blocks" for lengths from 256 bytes upwards and set
   value being zero.  It is mostly the __memset_power8 code but the
   alignment phase was simplified because, at this point, address is
   already 16-bytes aligned and also changed to use vector stores.
   The tail code was also simplified to reuse the general case tail.

All unaligned stores use stxvl instructions that do not generate
alignment interrupts on POWER10, making it safe to use on
caching-inhibited memory.

On average, this implementation provides something around 30%
improvement when compared to __memset_power8.

Reviewed-by: Matheus Castanho <msc@linux.ibm.com>
Reviewed-by: Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
3 years agopowerpc64le: Optimize memcpy for POWER10
Tulio Magno Quites Machado Filho [Fri, 30 Apr 2021 21:12:08 +0000 (18:12 -0300)]
powerpc64le: Optimize memcpy for POWER10

This implementation is based on __memcpy_power8_cached and integrates
suggestions from Anton Blanchard.
It benefits from loads and stores with length for short lengths and for
tail code, simplifying the code.

All unaligned memory accesses use instructions that do not generate
alignment interrupts on POWER10, making it safe to use on
caching-inhibited memory.

The main loop has also been modified in order to increase instruction
throughput by reducing the dependency on updates from previous iterations.

On average, this implementation provides around 30% improvement when
compared to __memcpy_power7 and 10% improvement in comparison to
__memcpy_power8_cached.

3 years agopowerpc64le: Optimized memmove for POWER10
Lucas A. M. Magalhaes [Fri, 30 Apr 2021 21:12:08 +0000 (18:12 -0300)]
powerpc64le: Optimized memmove for POWER10

This patch was initially based on the __memmove_power7 with some ideas
from strncpy implementation for Power 9.

Improvements from __memmove_power7:

1. Use lxvl/stxvl for alignment code.

   The code for Power 7 uses branches when the input is not naturally
   aligned to the width of a vector. The new implementation uses
   lxvl/stxvl instead which reduces pressure on GPRs. It also allows
   the removal of branch instructions, implicitly removing branch stalls
   and mispredictions.

2. Use of lxv/stxv and lxvl/stxvl pair is safe to use on Cache Inhibited
   memory.

   On Power 10 vector load and stores are safe to use on CI memory for
   addresses unaligned to 16B. This code takes advantage of this to
   do unaligned loads.

   The unaligned loads don't have a significant performance impact by
   themselves. However doing so decreases register pressure on GPRs
   and interdependence stalls on load/store pairs. This also improved
   readability as there are now less code paths for different alignments.
   Finally this reduces the overall code size.

3. Improved performance.

   This version runs on average about 30% better than memmove_power7
   for lengths  larger than 8KB. For input lengths shorter than 8KB
   the improvement is smaller, it has on average about 17% better
   performance.

   This version has a degradation of about 50% for input lengths
   in the 0 to 31 bytes range when dest is unaligned.

Reviewed-by: Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
3 years agoUpdate kernel version to 5.12 in tst-mman-consts.py.
Joseph Myers [Thu, 29 Apr 2021 10:50:11 +0000 (10:50 +0000)]
Update kernel version to 5.12 in tst-mman-consts.py.

This patch updates the kernel version in the test tst-mman-consts.py
to 5.12.  (There are no new MAP_* constants covered by this test in
5.12 that need any other header changes.)

Tested with build-many-glibcs.py.

3 years agoUpdate syscall lists for Linux 5.12.
Joseph Myers [Wed, 28 Apr 2021 17:19:24 +0000 (17:19 +0000)]
Update syscall lists for Linux 5.12.

Linux 5.12 has one new syscall, mount_setattr.  Update
syscall-names.list and regenerate the arch-syscall.h headers with
build-many-glibcs.py update-syscalls.

Tested with build-many-glibcs.py.

3 years agoregenerate ulps on x86_64 with -march=native
Paul Zimmermann [Wed, 28 Apr 2021 09:02:00 +0000 (11:02 +0200)]
regenerate ulps on x86_64 with -march=native

On x86_64, when configuring glibc with CFLAGS="-O2 -g -march=native",
some tests fail. After this patch, "make check" succeeds.

Tested on Intel Core i5-4590 with gcc 10.2.1.

3 years agoPass a valid pointer to pthread_setspecific to avoid GCC 11 warning.
Martin Sebor [Wed, 28 Apr 2021 01:05:30 +0000 (19:05 -0600)]
Pass a valid pointer to pthread_setspecific to avoid GCC 11 warning.

3 years agoAdd __attribute_access_none to disable GCC warnings [BZ #27714]
Martin Sebor [Tue, 27 Apr 2021 19:01:55 +0000 (13:01 -0600)]
Add __attribute_access_none to disable GCC warnings [BZ #27714]

GCC 11 warns when a pointer to an uninitialized object is passed
to a function that takes a const-qualified argument.  This is done
on the assumption that most such functions read from the object.
For the rare case of a function that doesn't, GCC 11 extends
attribute access to add a new mode called none.

POSIX pthread_setspecific() is one such rare function that takes
a const void* argument but that doesn't read from the object it
points to.  To suppress the -Wmaybe-uninitialized issued by GCC
11 when the address of an uninitialized object is passed to it
(e.g., the result of malloc()), this change #defines
__attr_access_none in cdefs.h and uses the macro on the function
in sysdeps/htl/pthread.h and sysdeps/nptl/pthread.h.

3 years agoUse Linux 5.12 and GCC 11 branch in build-many-glibcs.py.
Joseph Myers [Tue, 27 Apr 2021 15:19:08 +0000 (15:19 +0000)]
Use Linux 5.12 and GCC 11 branch in build-many-glibcs.py.

This patch makes build-many-glibcs.py use Linux 5.12 and GCC 11
branch.

Tested with build-many-glibcs.py (host-libraries, compilers and glibcs
builds).

3 years agopowerpc: Add log IFUNC multiarch support for POWER10
Raphael Moreira Zinsly [Thu, 25 Feb 2021 13:42:27 +0000 (10:42 -0300)]
powerpc: Add log IFUNC multiarch support for POWER10

Checked on ppc64le built without --with-cpu, with --with-cpu=power9
and with --disable-multi-arch.

Reviewed-by: Matheus Castanho <msc@linux.ibm.com>
3 years agoLC_COLLATE: Fix last character ellipsis handling (Bug 22668)
Hanataka Shinya [Thu, 18 Feb 2021 04:00:48 +0000 (23:00 -0500)]
LC_COLLATE: Fix last character ellipsis handling (Bug 22668)

During ellipsis processing the collation cursor was not correctly
moved to the end of the ellipsis after processing.

The code inserted the new entry after the cursor, but before the
real end of the ellipsis:
                                [cursor]
... element_t <-> element_t <-> element_t <-> element_t
                  "<U0000>"     "<U0001>"     "<U007F>"
                  startp                      endp

At the end of the function we have:

                  [cursor]
... element_t <-> element_t <-> element_t
                  "<U007E>"     "<U007F>"
                                endp

The cursor should be pointing at endp, the last element in the
doubly-linked list, otherwise when execution returns to the
caller we will start inserting the next line after <U007E>.

Subsequent operations end up unlinking the ellipsis end entry or
just leaving it in the list dangling from the end.  This kind of
dangling is immediately visible in C.UTF-8 with the following
sorting from strcoll:
<U0010FFFF>
<U0000FFFF>
<U000007FF>
<U0000007F>

With the cursor correctly adjusted the end entry is correctly given
the right location and thus the right weight.

Retested and no regressions on x86_64 and i686.

Co-authored-by: Carlos O'Donell <carlos@redhat.com>
3 years agox86: Optimize strchr-evex.S
Noah Goldstein [Fri, 23 Apr 2021 19:56:25 +0000 (15:56 -0400)]
x86: Optimize strchr-evex.S

No bug. This commit optimizes strchr-evex.S. The optimizations are
mostly small things such as save an ALU in the alignment process,
saving a few instructions in the loop return. The one significant
change is saving 2 instructions in the 4x loop. test-strchr,
test-strchrnul, test-wcschr, and test-wcschrnul are all passing.

Signed-off-by: Noah Goldstein <goldstein.w.n@gmail.com>
3 years agox86: Optimize strchr-avx2.S
Noah Goldstein [Fri, 23 Apr 2021 19:56:24 +0000 (15:56 -0400)]
x86: Optimize strchr-avx2.S

No bug. This commit optimizes strchr-avx2.S. The optimizations are all
small things such as save an ALU in the alignment process, saving a
few instructions in the loop return, saving some bytes in the main
loop, and increasing the ILP in the return cases. test-strchr,
test-strchrnul, test-wcschr, and test-wcschrnul are all passing.

Signed-off-by: Noah Goldstein <goldstein.w.n@gmail.com>
3 years agonptl: Remove __h_errno_location from libpthread
Florian Weimer [Fri, 23 Apr 2021 16:08:38 +0000 (18:08 +0200)]
nptl: Remove __h_errno_location from libpthread

The existing definition in libc will be used instead.

The symbol was moved (that is, removed) using
scripts/move-symbol-to-libc.py.

3 years agonptl: Remove __res_state from libpthread
Florian Weimer [Fri, 23 Apr 2021 16:08:37 +0000 (18:08 +0200)]
nptl: Remove __res_state from libpthread

The existing definition in libc will be used instead.

The symbol was moved (that is, removed) using
scripts/move-symbol-to-libc.py.

3 years agonptl: Move pthread_spin_trylock into libc
Florian Weimer [Fri, 23 Apr 2021 08:23:24 +0000 (10:23 +0200)]
nptl: Move pthread_spin_trylock into libc

The symbol was moved using scripts/move-symbol-to-libc.py.

3 years agonptl: Move pthread_spin_lock into libc
Florian Weimer [Fri, 23 Apr 2021 08:11:51 +0000 (10:11 +0200)]
nptl: Move pthread_spin_lock into libc

The symbol was moved using scripts/move-symbol-to-libc.py.

3 years agonptl: Move pthread_spin_init, Move pthread_spin_unlock into libc
Florian Weimer [Thu, 22 Apr 2021 13:18:12 +0000 (15:18 +0200)]
nptl: Move pthread_spin_init, Move pthread_spin_unlock  into libc

For some architectures, the two functions are aliased, so these
symbols need to be moved at the same time.

The symbols were moved using scripts/move-symbol-to-libc.py.

3 years agonptl: Move pthread_spin_destroy into libc
Florian Weimer [Thu, 22 Apr 2021 13:12:09 +0000 (15:12 +0200)]
nptl: Move pthread_spin_destroy into libc

The symbol was moved using scripts/move-symbol-to-libc.py.

This page took 0.083878 seconds and 5 git commands to generate.