Commit graph

201 commits

Author SHA1 Message Date
Florian Weimer 7ad553b96e Linux: Move aio_read, aio_read64 into libc
Both symbols have to be moved at the same time because they
are intertwined for __WORDSIZE == 64.  The treatment of this case
is also changed to match more closely how the other files suppress
the declaration of the *64 identifier.

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

Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
2021-06-25 11:53:37 +02:00
Florian Weimer 1f3a8e716d Linux: Move aio_fsync, aio_fsync64 into libc
The symbols were moved using scripts/move-symbol-to-libc.py.

Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
2021-06-25 11:50:24 +02:00
Florian Weimer 1a7d0dedf0 Linux: Move aio_error, aio_error64 into libc
The symbols were moved using scripts/move-symbol-to-libc.py.

Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
2021-06-25 11:49:55 +02:00
Florian Weimer 3df6dcc5c7 Linux: Move aio_cancel, aio_cancel64 into libc
The symbols were moved using scripts/move-symbol-to-libc.py.

A version placeholder symbol is needed on alpha and sparc because
of the additional symbols formerly at version GLIBC_2.3.

Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>:
2021-06-25 11:48:46 +02:00
Florian Weimer d12506b2db Linux: Move aio_init from librt into libc
This commit also moves the aio_misc and aio_sigquue helper,
so GLIBC_PRIVATE exports need to be added.

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

Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
2021-06-25 11:48:25 +02:00
Florian Weimer ae830b2d9f rt: Move shm_unlink into libc
This function has no dependency on libpthread, so the move is also
applied to Hurd.

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

Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
2021-06-21 08:25:15 +02:00
Florian Weimer c6e7ec2f12 rt: Move shm_open into libc
This function has no dependency on libpthread, so the move is also
applied to Hurd.

To avoid localplt failures, use __open64_nocancel instead of
pthread_setcancelstate and open.

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

Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
2021-06-21 08:25:15 +02:00
Florian Weimer aa9a7f6296 nptl: Export _pthread_cleanup_push, _pthread_cleanup_pop again
These were turned into compat symbols as part of the libpthread
move.  It turns out they are used by language run-time libraries
(e.g., the GCC D front end), so it makes to preserve them as
external symbols even though they are not declared in any header
file.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
2021-06-15 21:19:16 +02:00
Adhemerval Zanella 19873b18b0 io: Add ftw64 with 64-bit time_t support
Similar to fts, ftw routines passes a stat pointer that might
differ of size and layout when 64-bit time API is used.

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

Reviewed-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Tested-by: Carlos O'Donell <carlos@redhat.com>
2021-06-15 10:42:11 -03:00
Adhemerval Zanella 70961aee18 io: Add fts64 with 64-bit time_t support
Similar to glob, fts routines passes a stat pointer that might
differ of size and layout when 64-bit time API is used.

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

Reviewed-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Tested-by: Carlos O'Donell <carlos@redhat.com>
2021-06-15 10:42:11 -03:00
Adhemerval Zanella 84f7ce8447 posix: Add glob64 with 64-bit time_t support
The glob might pass a different stat struct for gl_stat and gl_lstat
when GLOB_ALTDIRFUNC is used.  This requires add a new 64-bit time
version that also uses 64-bit time stat functions.

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

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Tested-by: Carlos O'Donell <carlos@redhat.com>
2021-06-15 10:42:11 -03:00
Adhemerval Zanella 47f24c21ee y2038: Add support for 64-bit time on legacy ABIs
A new build flag, _TIME_BITS, enables the usage of the newer 64-bit
time symbols for legacy ABI (where 32-bit time_t is default).  The 64
bit time support is only enabled if LFS (_FILE_OFFSET_BITS=64) is
also used.

Different than LFS support, the y2038 symbols are added only for the
required ABIs (armhf, csky, hppa, i386, m68k, microblaze, mips32,
mips64-n32, nios2, powerpc32, sparc32, s390-32, and sh).  The ABIs with
64-bit time support are unchanged, both for symbol and types
redirection.

On Linux the full 64-bit time support requires a minimum of kernel
version v5.1.  Otherwise, the 32-bit fallbacks are used and might
results in error with overflow return code (EOVERFLOW).

The i686-gnu does not yet support 64-bit time.

This patch exports following rediretions to support 64-bit time:

  * libc:
    adjtime
    adjtimex
    clock_adjtime
    clock_getres
    clock_gettime
    clock_nanosleep
    clock_settime
    cnd_timedwait
    ctime
    ctime_r
    difftime
    fstat
    fstatat
    futimens
    futimes
    futimesat
    getitimer
    getrusage
    gettimeofday
    gmtime
    gmtime_r
    localtime
    localtime_r
    lstat_time
    lutimes
    mktime
    msgctl
    mtx_timedlock
    nanosleep
    nanosleep
    ntp_gettime
    ntp_gettimex
    ppoll
    pselec
    pselect
    pthread_clockjoin_np
    pthread_cond_clockwait
    pthread_cond_timedwait
    pthread_mutex_clocklock
    pthread_mutex_timedlock
    pthread_rwlock_clockrdlock
    pthread_rwlock_clockwrlock
    pthread_rwlock_timedrdlock
    pthread_rwlock_timedwrlock
    pthread_timedjoin_np
    recvmmsg
    sched_rr_get_interval
    select
    sem_clockwait
    semctl
    semtimedop
    sem_timedwait
    setitimer
    settimeofday
    shmctl
    sigtimedwait
    stat
    thrd_sleep
    time
    timegm
    timerfd_gettime
    timerfd_settime
    timespec_get
    utime
    utimensat
    utimes
    utimes
    wait3
    wait4

  * librt:
    aio_suspend
    mq_timedreceive
    mq_timedsend
    timer_gettime
    timer_settime

  * libanl:
    gai_suspend

Reviewed-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Tested-by: Carlos O'Donell <carlos@redhat.com>
2021-06-15 10:42:11 -03:00
Florian Weimer 0c1c3a771e dlfcn: Move dlopen into libc
The symbol was moved using scripts/move-symbol-to-libc.py.

Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
2021-06-03 08:26:04 +02:00
Florian Weimer add8d7ea01 dlfcn: Move dlvsym into libc
The symbol was moved using scripts/move-symbol-to-libc.py.

Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
2021-06-03 08:26:04 +02:00
Florian Weimer 6dfc0207eb dlfcn: Move dlinfo into libc
The symbol was moved using scripts/move-symbol-to-libc.py.

Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
2021-06-03 08:26:04 +02:00
Florian Weimer 492560a32e dlfcn: Move dladdr1 into libc
The symbol was moved using scripts/move-symbol-to-libc.py.

Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
2021-06-03 08:26:04 +02:00
Florian Weimer 6a1ed32789 dlfcn: Move dlmopen into libc
The symbol was moved using scripts/move-symbol-to-libc.py.

Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
2021-06-03 08:26:04 +02:00
Florian Weimer 77f876c0e3 dlfcn: Move dlsym into libc
The symbol was moved using scripts/move-symbol-to-libc.py.

In elf/Makefile, remove the $(libdl) dependency from testobj1.so
because it the unused libdl DSO now causes elf/tst-unused-deps to
fail.

Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
2021-06-03 08:26:04 +02:00
Florian Weimer 602252b553 dlfcn: Move dladdr into libc
The symbol was moved using scripts/move-symbol-to-libc.py.

Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
2021-06-03 08:26:04 +02:00
Florian Weimer d8cce17d2a dlfcn: Move dlclose into libc
The symbol was moved using scripts/move-symbol-to-libc.py.

Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
2021-06-03 08:26:04 +02:00
Florian Weimer a23c28ec0d dlfcn: Move dlerror into libc
The symbol was moved using scripts/move-symbol-to-libc.py.

There is a minor functionality enhancement: dlerror now sets
errno if it was set as part of the exception.  (This is the result
of using %m in asprintf, to avoid the strerror PLT call.) The
previous errno value upon function return was unpredictable.
Documenting this as a feature is premature; we need to make sure
that the error codes are meaningful when they are set by the dynamic
loader.

Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
2021-06-02 09:06:10 +02:00
Florian Weimer f47f1d91af nptl: Move pthread_create, thrd_create into libc
The symbols were moved using scripts/move-symbol-to-libc.py.

The libpthread placeholder symbols need some changes because some
symbol versions have gone away completely.  But
__errno_location@@GLIBC_2.0 still exists, so the GLIBC_2.0 version
is still there.

The internal __pthread_create symbol now points to the correct
function, so the sysdeps/nptl/thrd_create.c override is no longer
necessary.

There was an issue how the hidden alias of pthread_getattr_default_np
was defined, so this commit cleans up that aspects and removes the
GLIBC_PRIVATE export altogether.

Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
2021-05-21 22:35:00 +02:00
Joseph Myers e5ac7bd679 Add C2X timespec_getres
ISO C2X adds a timespec_getres function alongside the C11
timespec_get, with functionality similar to that of POSIX clock_getres
(including allowing a NULL pointer to be passed to the function).
Implement this function for glibc, similarly to the implementation of
timespec_get.

This includes a basic test like that of timespec_get, but no
documentation in the manual, given that TIME_UTC and timespec_get
aren't documented in the manual at all.  The handling of 64-bit time
follows that in timespec_get; people maintaining patch series for
64-bit time will need to update them accordingly (to export
__timespec_getres64, redirect calls in time.h and run the test for
_TIME_BITS=64).

Tested for x86_64 and x86, and (previous version; only testcase
differs) with build-many-glibcs.py.
2021-05-17 20:55:21 +00:00
Florian Weimer 2d53566ec3 nptl: Move pthread_sigqueue into libc
The symbol was moved using scripts/move-symbol-to-libc.py.

The GLIBC_2.11 version is now empty, so add a placeholder symbol.

Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
2021-05-17 10:25:12 +02:00
Florian Weimer 56f823abd4 nptl: Move pthread_setschedprio into libc
The symbol was moved using scripts/move-symbol-to-libc.py.

The GLIBC_2.3.4 version is now empty, so add a placeholder symbol.

Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
2021-05-17 10:25:12 +02:00
Florian Weimer 8bc6a6d73c nptl: Move pthread_setname_np into libc
The symbol was moved using scripts/move-symbol-to-libc.py.

Add __libpthread_version_placeholder@@GLIBC_2.12 for the targets
that need it.

Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
2021-05-17 10:25:12 +02:00
Florian Weimer 7b300ec7f9 nptl: Move pthread_setaffinity_np into libc
The symbol was moved using scripts/move-symbol-to-libc.py.

Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
2021-05-17 10:25:12 +02:00
Florian Weimer c924e44acd nptl: Move pthread_getname_np into libc
The symbol was moved using scripts/move-symbol-to-libc.py.

Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
2021-05-17 10:25:12 +02:00
Florian Weimer 310e59e64c nptl: Move pthread_getcpuclockid into libc
The symbol was moved using scripts/move-symbol-to-libc.py.

__libpthread_version_placeholder@@GLIBC_2.2 is needed by this change;
the Versions entry for GLIBC_2.2 in libpthread had leftover symbols
due to an error in a previous conflict resolution.  The condition
for the placeholder symbol is complicated because some architectures
have earlier symbols at the GLIBC_2.2 symbol versions, so the
placeholder is not required there (yet).

Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
2021-05-17 10:25:11 +02:00
Florian Weimer 8f72bed1aa nptl: Move pthread_getattr_default_np into libc
The symbol was moved using scripts/move-symbol-to-libc.py.

A new placeholder symbol __libpthread_version_placeholder@GLIBC_2.18
is needed to keep the GLIBC_2.18 symbol version in libpthread.
The __pthread_getattr_default_np@@GLIBC_PRIVATE export is used
from pthread_create.

Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
2021-05-17 10:25:11 +02:00
Florian Weimer fec776b827 nptl: Move pthread_getconcurrency, pthread_setconcurrency into libc
The symbols were moved using scripts/move-symbol-to-libc.py,
in one commit due to their dependency on the internal
__concurrency_level variable.

Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
2021-05-11 20:33:14 +02:00
Florian Weimer d7c51fe4f0 nptl: Move pthread_cancel into libc
The symbol was moved using scripts/move-symbol-to-libc.py.

Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
2021-05-11 20:21:30 +02:00
Florian Weimer c4c53e0f56 nptl: Move __pthread_register_cancel_defer, __pthread_unregister_cancel_restore to libc
The symbols were moved using scripts/move-symbol-to-libc.py.

Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
2021-05-11 20:21:27 +02:00
Florian Weimer 3ec8b1c7a9 nptl: Move __pthread_register_cancel, __pthread_unregister_cancel to libc
The symbols were moved using scripts/move-symbol-to-libc.py.

Also clean up some unwinder linking leftover in the same spot
in nptl/pthreadP.h.

Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
2021-05-11 20:20:58 +02:00
Florian Weimer 870218fb30 nptl: Move pthread_attr_setstacksize into libc
The symbol was moved using scripts/move-symbol-to-libc.py.

It is necessary to arrange for a
__libpthread_version_placeholder@GLIBC_2.6 on some of the powerpc
targets.

Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
2021-05-11 19:33:20 +02:00
Florian Weimer 736c57c96c nptl: Move pthread_attr_setstackaddr into libc
The symbol was moved using scripts/move-symbol-to-libc.py.

Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
2021-05-11 19:33:19 +02:00
Florian Weimer b855e52bae nptl: Move pthread_attr_setstack into libc
The symbol was moved using scripts/move-symbol-to-libc.py.

Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
2021-05-11 19:33:17 +02:00
Florian Weimer da069d1714 nptl: Move pthread_attr_setguardsize into libc
The symbol was moved using scripts/move-symbol-to-libc.py.

Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
2021-05-11 19:33:15 +02:00
Florian Weimer ee092efed4 nptl: Move pthread_attr_getstacksize into libc
The symbol was moved using scripts/move-symbol-to-libc.py.

Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
2021-05-11 19:33:14 +02:00
Florian Weimer b5e75df2a5 nptl: Move pthread_attr_getstackaddr into libc
The symbol was moved using scripts/move-symbol-to-libc.py.

Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
2021-05-11 19:33:13 +02:00
Florian Weimer fb7abc3441 nptl: Move pthread_attr_getstack into libc
The symbol was moved using scripts/move-symbol-to-libc.py.

Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
2021-05-11 19:33:11 +02:00
Florian Weimer b5668f08ea nptl: Move pthread_attr_getguardsize into libc
The symbol was moved using scripts/move-symbol-to-libc.py.

Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
2021-05-11 19:33:10 +02:00
Florian Weimer f5bc5f6e2a nptl: Move pthread_attr_getaffinity_np into libc
The symbol was moved using scripts/move-symbol-to-libc.py.

Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
2021-05-11 19:32:56 +02:00
Florian Weimer ddd4a2d3c6 nptl: Move thread join functions into libc
The symbols pthread_clockjoin_np, pthread_join, pthread_timedjoin_np,
pthread_tryjoin_np, thrd_join were moved using
scripts/move-symbol-to-libc.py.

Moving the symbols at the same time avoids the need for temporary
exports.

Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
2021-05-11 11:24:39 +02:00
Florian Weimer df65f897e9 nptl: Move pthread_detach, thrd_detach into libc
The symbols were moved using scripts/move-symbol-to-libc.py.

Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
2021-05-11 11:24:39 +02:00
Florian Weimer 249bd833a0 nptl: Move pthread_setattr_default_np into libc
The symbol was moved using scripts/move-symbol-to-libc.py.

The export of  __default_pthread_attr_freeres is temporary.  There
is a minor regression in freeres coverage because in the dynamic case,
__default_pthread_attr_freeres is no longer called if libpthread is
not linked in.

Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
2021-05-11 11:10:03 +02:00
Florian Weimer 3f0808ef4c 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>
2021-05-06 15:56:37 +02:00
Florian Weimer 39e74af22e 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>
2021-05-06 15:56:37 +02:00
Florian Weimer e731212bc3 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>
2021-05-06 15:56:37 +02:00
Florian Weimer bbacf0f56c 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>
2021-05-06 15:56:37 +02:00
Florian Weimer b9aec0dd9f 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>
2021-05-06 15:56:37 +02:00
Florian Weimer f1af331c4e 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>
2021-05-06 15:56:37 +02:00
Florian Weimer 43b3746aff 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>
2021-05-06 15:56:37 +02:00
Florian Weimer 5633541d3b 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>
2021-05-05 17:19:53 +02:00
Florian Weimer 990c8ffd3a 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>
2021-05-05 17:19:50 +02:00
Florian Weimer 018c75dcb1 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>
2021-05-05 17:19:48 +02:00
Florian Weimer 793042c63c 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>
2021-05-05 17:19:47 +02:00
Florian Weimer 1ae60ae74f 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>
2021-05-05 17:19:45 +02:00
Florian Weimer 61878689c2 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>
2021-05-05 17:19:43 +02:00
Florian Weimer 4b729cca87 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>
2021-05-05 17:19:40 +02:00
Florian Weimer 0b7d48d106 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>
2021-05-05 17:19:38 +02:00
Florian Weimer 19cc20ef2e 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>
2021-05-05 17:19:35 +02:00
Florian Weimer 0197c1bc60 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>
2021-05-05 17:19:20 +02:00
Alexandra Hájková 19d83270fc 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>
2021-05-03 16:46:06 -03:00
Florian Weimer c2fd60a586 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>
2021-05-03 09:23:44 +02:00
Florian Weimer 0505ae4e3b 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>
2021-05-03 09:18:45 +02:00
Florian Weimer b444409479 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>
2021-05-03 09:18:42 +02:00
Florian Weimer dbfa12e201 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>
2021-05-03 09:18:38 +02:00
Florian Weimer 0af0ccc2d5 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>
2021-05-03 09:18:35 +02:00
Florian Weimer 9f13a95b6f 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>
2021-05-03 09:18:31 +02:00
Florian Weimer a8841e00d6 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>
2021-05-03 09:18:25 +02:00
Florian Weimer e8a9597159 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>
2021-05-03 09:18:20 +02:00
Florian Weimer c96dddd731 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>
2021-05-03 09:18:16 +02:00
Florian Weimer e7d2d48e56 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>
2021-05-03 09:18:12 +02:00
Florian Weimer 2392feb171 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>
2021-05-03 09:18:04 +02:00
Florian Weimer 63627246f3 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>
2021-05-03 09:17:59 +02:00
Florian Weimer 504ac633b0 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>
2021-05-03 09:17:36 +02:00
Florian Weimer 2cf5b43bcb 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>
2021-05-03 09:17:27 +02:00
Florian Weimer 0ace9b197c 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>
2021-05-03 09:16:49 +02:00
Florian Weimer 2c5c5c87c9 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>
2021-05-03 08:18:08 +02:00
Florian Weimer a062ba3836 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>
2021-05-03 08:18:01 +02:00
Florian Weimer deb317d510 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>
2021-05-03 08:17:38 +02:00
Florian Weimer e4036b1ce9 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>
2021-05-03 08:17:29 +02:00
Florian Weimer 96e61709b4 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>
2021-05-03 08:17:15 +02:00
Florian Weimer ae4a5ca074 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>
2021-05-03 08:16:48 +02:00
Florian Weimer 08970190fc 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>
2021-05-03 08:15:58 +02:00
Florian Weimer 032a9e17a7 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>
2021-05-03 08:15:53 +02:00
Florian Weimer b7863c732e 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>
2021-05-03 08:15:41 +02:00
Florian Weimer f44c9a24ed 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>
2021-05-03 08:15:22 +02:00
Florian Weimer 17b67416c5 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>
2021-05-03 08:15:15 +02:00
Florian Weimer cf3fff1c19 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>
2021-05-03 08:15:10 +02:00
Florian Weimer 08a31ef923 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>
2021-05-03 08:15:04 +02:00
Florian Weimer eef936eb45 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>
2021-05-03 08:14:49 +02:00
Florian Weimer 3eab466e56 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>
2021-05-03 08:14:38 +02:00
Florian Weimer f11c293a4c 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>
2021-05-03 08:14:28 +02:00
Florian Weimer 0431f171da 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>
2021-05-03 08:14:17 +02:00
Florian Weimer 575295fc83 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>
2021-05-03 08:14:01 +02:00
Florian Weimer 4baf02b332 nptl: Move pthread_spin_trylock into libc
The symbol was moved using scripts/move-symbol-to-libc.py.
2021-04-23 17:06:48 +02:00
Florian Weimer da8e3710d8 nptl: Move pthread_spin_lock into libc
The symbol was moved using scripts/move-symbol-to-libc.py.
2021-04-23 17:06:46 +02:00
Florian Weimer ce4b3b7bef 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.
2021-04-23 17:06:44 +02:00