aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/unix/sysv
AgeCommit message (Collapse)Author
2021-06-03dlfcn: Move dlvsym into libcFlorian Weimer
The symbol was moved using scripts/move-symbol-to-libc.py. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2021-06-03dlfcn: Move dlinfo into libcFlorian Weimer
The symbol was moved using scripts/move-symbol-to-libc.py. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2021-06-03dlfcn: Move dladdr1 into libcFlorian Weimer
The symbol was moved using scripts/move-symbol-to-libc.py. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2021-06-03dlfcn: Move dlmopen into libcFlorian Weimer
The symbol was moved using scripts/move-symbol-to-libc.py. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2021-06-03dlfcn: Move dlsym into libcFlorian Weimer
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-03dlfcn: Move dladdr into libcFlorian Weimer
The symbol was moved using scripts/move-symbol-to-libc.py. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2021-06-03dlfcn: Move dlclose into libcFlorian Weimer
The symbol was moved using scripts/move-symbol-to-libc.py. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2021-06-02dlfcn: Move dlerror into libcFlorian Weimer
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-02Add libc ABI extension kludge for baseline-violating libdl symbolsFlorian Weimer
Some targets have a GLIBC_2.0 baseline for libdl, while using GLIBC_2.2 for libc. This means that the generated libc.map file does not have any version nodes for GLIBC_2.0 or GLIBC_2.1. However, moving symbols from libdl into libc needs such version nodes. (Future symbol moves from librt will need this as well.) This kludge is only necessary for symbols predating GLIBC_2.2 because the affected targets use GLIBC_2.2 as the baseline for libc. Given the small number and fixed set of affected architectures, no generic mechanism is implemented, and instead the map file fragment is hard-coded in scripts/versions.mk. The compat_symbol macro already emits the appropriate version strings, so no adjustments are needed there. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2021-06-02Add missing symbols to Version filesFlorian Weimer
Some symbols have explicit versioned_symbol or compat_symbol markers in the sources, but no corresponding entry in the Versions files. This presently works because the local: * directive is only applied to the base version. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2021-06-02Fix use of __pthread_attr_copy in mq_notify (bug 27896)Florian Weimer
__pthread_attr_copy can fail and does not initialize the attribute structure in that case. If __pthread_attr_copy is never called and there is no allocated attribute, pthread_attr_destroy should not be called, otherwise there is a null pointer dereference in rt/tst-mqueue6. Fixes commit 42d359350510506b87101cf77202fefcbfc790cb ("Use __pthread_attr_copy in mq_notify (bug 27896)"). Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
2021-06-01Use __pthread_attr_copy in mq_notify (bug 27896)Andreas Schwab
Make a deep copy of the pthread attribute object to remove a potential use-after-free issue.
2021-06-01aarch64: align stack in clone [BZ #27939]Szabolcs Nagy
The AArch64 PCS requires 16 byte aligned stack. Previously if the caller passed an unaligned stack to clone then the child crashed. Fixes bug 27939.
2021-05-31x86-64: Align child stack to 16 bytes [BZ #27902]H.J. Lu
In the x86-64 clone wrapper, align child stack to 16 bytes per the x86-64 psABI. Reviewed-by: Carlos O'Donell <carlos@redhat.com>
2021-05-27nptl: Move Linux createthread to nptlAdhemerval Zanella
git mv -f sysdeps/unix/sysv/linux/createthread.c nptl/createthread.c No functional change.
2021-05-27aarch64: Added optimized memcpy and memmove for A64FXNaohiro Tamura
This patch optimizes the performance of memcpy/memmove for A64FX [1] which implements ARMv8-A SVE and has L1 64KB cache per core and L2 8MB cache per NUMA node. The performance optimization makes use of Scalable Vector Register with several techniques such as loop unrolling, memory access alignment, cache zero fill, and software pipelining. SVE assembler code for memcpy/memmove is implemented as Vector Length Agnostic code so theoretically it can be run on any SOC which supports ARMv8-A SVE standard. We confirmed that all testcases have been passed by running 'make check' and 'make xcheck' not only on A64FX but also on ThunderX2. And also we confirmed that the SVE 512 bit vector register performance is roughly 4 times better than Advanced SIMD 128 bit register and 8 times better than scalar 64 bit register by running 'make bench'. [1] https://github.com/fujitsu/A64FX Reviewed-by: Wilco Dijkstra <Wilco.Dijkstra@arm.com> Reviewed-by: Szabolcs Nagy <Szabolcs.Nagy@arm.com>
2021-05-26aarch64: Added Vector Length Set test helper scriptNaohiro Tamura
This patch is a test helper script to change Vector Length for child process. This script can be used as test-wrapper for 'make check'. Usage examples: ~/build$ make check subdirs=string \ test-wrapper='~/glibc/sysdeps/unix/sysv/linux/aarch64/vltest.py 16' ~/build$ ~/glibc/sysdeps/unix/sysv/linux/aarch64/vltest.py 16 \ make test t=string/test-memcpy ~/build$ ~/glibc/sysdeps/unix/sysv/linux/aarch64/vltest.py 32 \ ./debugglibc.sh string/test-memmove ~/build$ ~/glibc/sysdeps/unix/sysv/linux/aarch64/vltest.py 64 \ ./testrun.sh string/test-memset
2021-05-25Linux: Remove remaining references to $(shared-thread-library)Florian Weimer
Since the variable expands to nothing under Linux, it is no longer necessary to clutter the makefiles with it. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2021-05-21nptl: Remove remaining code from libpthreadFlorian Weimer
Only the placeholder compatibility symbols are left now. The __errno_location symbol was removed (moved) using scripts/move-symbol-to-libc.py. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2021-05-21nptl: Move pthread_create, thrd_create into libcFlorian Weimer
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-18linux: Fix clock_getres fallbackAdhemerval Zanella
The tst-timespec_getres (e5ac7bd679de5) triggers an issue on 32-bit architecture on Linux older than 5.1, where the fallback syscall is used. Checked on powerpc-linux-gnu.
2021-05-17Add C2X timespec_getresJoseph Myers
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-17nptl: Move pthread_sigqueue into libcFlorian Weimer
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-17nptl: Move pthread_setschedprio into libcFlorian Weimer
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-17nptl: Move pthread_setname_np into libcFlorian Weimer
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-17nptl: Move pthread_setaffinity_np into libcFlorian Weimer
The symbol was moved using scripts/move-symbol-to-libc.py. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2021-05-17nptl: Move pthread_getname_np into libcFlorian Weimer
The symbol was moved using scripts/move-symbol-to-libc.py. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2021-05-17nptl: Move pthread_getcpuclockid into libcFlorian Weimer
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-17nptl: Replace pthread_getcpuclockid with Linux implementationFlorian Weimer
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2021-05-17nptl: Move pthread_getattr_default_np into libcFlorian Weimer
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-17powerpc: Remove _dl_var_initFlorian Weimer
The generic __rtld_static_init code handles GLRO (dl_pagesize), GLRO (dl_auxv), GLRO (dl_hwcap), GLRO (dl_hwcap2). GLRO (dl_cache_line_size) is handled in an __rtld_static_init_arch override. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2021-05-17mips: Remove _dl_var_initFlorian Weimer
The generic __rtld_static_init code handles GLRO (dl_pagesize). Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2021-05-17m68k: Remove _dl_var_initFlorian Weimer
The generic __rtld_static_init code handles GLRO (dl_pagesize). Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2021-05-17ia64: Remove _dl_var_initFlorian Weimer
The generic __rtld_static_init code handles GLRO (dl_pagesize) and GLRO (dl_clktck). Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2021-05-17arc: Remove _dl_var_initFlorian Weimer
The generic __rtld_static_init code handles GLRO (dl_pagesize). Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2021-05-17aarch64: Remove _dl_var_initFlorian Weimer
The generic __rtld_static_init code handles GLRO (dl_pagesize). Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2021-05-12linux/check_native: Always close socket on returnSiddhesh Poyarekar
The error paths of __check_native would leave the socket FD open on return, resulting in an FD leak. Rework function exit paths so that the fd is always closed on return.
2021-05-11nptl: Move pthread_getconcurrency, pthread_setconcurrency into libcFlorian Weimer
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-11nptl: Move pthread_cancel into libcFlorian Weimer
The symbol was moved using scripts/move-symbol-to-libc.py. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2021-05-11nptl: Move __pthread_register_cancel_defer, ↵Florian Weimer
__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-11nptl: Move __pthread_register_cancel, __pthread_unregister_cancel to libcFlorian Weimer
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-11nptl: Move pthread_attr_setstacksize into libcFlorian Weimer
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-11nptl: Move pthread_attr_setstackaddr into libcFlorian Weimer
The symbol was moved using scripts/move-symbol-to-libc.py. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2021-05-11nptl: Move pthread_attr_setstack into libcFlorian Weimer
The symbol was moved using scripts/move-symbol-to-libc.py. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2021-05-11nptl: Move pthread_attr_setguardsize into libcFlorian Weimer
The symbol was moved using scripts/move-symbol-to-libc.py. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2021-05-11nptl: Move pthread_attr_getstacksize into libcFlorian Weimer
The symbol was moved using scripts/move-symbol-to-libc.py. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2021-05-11nptl: Move pthread_attr_getstackaddr into libcFlorian Weimer
The symbol was moved using scripts/move-symbol-to-libc.py. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2021-05-11nptl: Move pthread_attr_getstack into libcFlorian Weimer
The symbol was moved using scripts/move-symbol-to-libc.py. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2021-05-11nptl: Move pthread_attr_getguardsize into libcFlorian Weimer
The symbol was moved using scripts/move-symbol-to-libc.py. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2021-05-11nptl: Move pthread_attr_getaffinity_np into libcFlorian Weimer
The symbol was moved using scripts/move-symbol-to-libc.py. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>