about summary refs log tree commit diff
path: root/sysdeps/unix/sysv/linux/csky
Commit message (Collapse)AuthorAgeFilesLines
* nptl: Move pthread_mutex_trylock, __pthread_mutex_trylock into libcFlorian Weimer2021-04-232-2/+4
| | | | | | | | The symbols were moved using scripts/move-symbol-to-libc.py. __pthread_mutex_trylock is used to implement mtx_timedlock, which still resides in libpthread, so add a GLIBC_2.34 version for it, to match the existing GLIBC_2.0 version.
* nptl: Move pthread_mutex_timedlock, pthread_mutex_clocklock to libcFlorian Weimer2021-04-232-2/+4
| | | | | | | The symbols were moved using scripts/move-symbol-to-libc.py. The symbol aliasing follows pthread_cond_timedwait et al. Missing hidden prototypes had to be added to nptl/pthreadP.h for consistency.
* nptl: Move pthread_mutex_setprioceiling into libcFlorian Weimer2021-04-232-1/+2
| | | | The symbol was moved using scripts/move-symbol-to-libc.py.
* nptl: Move pthread_mutex_getprioceiling into libcFlorian Weimer2021-04-232-1/+2
| | | | The symbol was moved using scripts/move-symbol-to-libc.py.
* nptl: Move pthread_kill_other_threads_np compatibility symbol into libcFlorian Weimer2021-04-222-1/+1
| | | | And stop including the function for new architectures.
* nptl: Move core condition variable functions into libcFlorian Weimer2021-04-212-5/+2
| | | | | | | | | | | | | | | Onl pthread_cond_clockwait did not have a forwarder, so it needs a new symbol version. Some complications arise due to the need to supply hidden aliases, GLIBC_PRIVATE exports (for the C11 condition variable implementation that still remains in libpthread) and 64-bit time_t stubs. pthread_cond_broadcast, pthread_cond_signal, pthread_cond_timedwait, pthread_cond_wait, pthread_cond_clockwait have been moved using scripts/move-symbol-to-libc.py. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* nptl: Move core mutex functions into libcFlorian Weimer2021-04-212-8/+8
| | | | | | | | | | | | | | This is complicated because of a second compilation of nptl/pthread_mutex_lock.c via nptl/pthread_mutex_cond_lock.c. PTHREAD_MUTEX_VERSIONS is introduced to suppress symbol versions in that case. The symbols __pthread_mutex_lock, __pthread_mutex_unlock, __pthread_mutex_init, __pthread_mutex_destroy, pthread_mutex_lock, pthread_mutex_unlock, pthread_mutex_init, pthread_mutex_destroy have been moved using scripts/move-symbol-to-libc.py. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* nptl: Move rwlock functions with forwarders into libcFlorian Weimer2021-04-212-6/+9
| | | | | | | | | | | | | | | The forwarders were only used internally, so new symbol versions are needed. All symbols are moved at once because the forwarders are no-ops if libpthread is not loaded, leading to inconsistencies in case of a partial migration. The symbols __pthread_rwlock_rdlock, __pthread_rwlock_unlock, __pthread_rwlock_wrlock, pthread_rwlock_rdlock, pthread_rwlock_unlock, pthread_rwlock_wrlock have been moved using scripts/move-symbol-to-libc.py. The __ symbol variants are turned into compat symbols, which is why they do not receive a GLIBC_2.34 version.
* nptl: Move pthread_key_delete into libc.Florian Weimer2021-04-212-1/+2
| | | | | | | The symbol was moved using scripts/move-symbol-to-libc.py. tss_delete (still in libpthread) uses the __pthread_key_create alias, so that is now exported under GLIBC_PRIVATE.
* nptl: Move pthread_setspecific, __pthread_setspecific into libcFlorian Weimer2021-04-212-2/+4
| | | | The symbols have been moved using scripts/move-symbol-to-libc.py.
* nptl: Move pthread_getspecific, __pthread_getspecific into libcFlorian Weimer2021-04-212-2/+4
| | | | The symbols have been moved using scripts/move-symbol-to-libc.py.
* nptl: Move pthread_key_create, __pthread_key_create into libcFlorian Weimer2021-04-212-2/+4
| | | | The symbols have been moved using scripts/move-symbol-to-libc.py.
* nptl: Move pthread_setcanceltype into libcFlorian Weimer2021-04-211-1/+0
| | | | | | | | No new symbol version is required because there was a forwarder. The symbol has been moved using scripts/move-symbol-to-libc.py. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* nptl: Move pthread_setcancelstate into libcFlorian Weimer2021-04-211-1/+0
| | | | | | | | No new symbol version is required because there was a forwarder. The symbol has been moved using scripts/move-symbol-to-libc.py. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* nptl: Move pthread_exit into libcFlorian Weimer2021-04-211-1/+0
| | | | | | | | | | | | | | The pthread_exit symbol was moved using scripts/move-symbol-to-libc.py. No new symbol version is needed because there was a forwarder. The new tests nptl/tst-pthread_exit-nothreads and nptl/tst-pthread_exit-nothreads-static exercise the scenario that pthread_exit is called without libpthread having been linked in. This is not possible for the generic code, so these tests do not live in sysdeps/pthread for now. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* nptl: Move __pthread_unwind_next into libcFlorian Weimer2021-04-212-1/+2
| | | | | | | | | | | | | | | | | | | It's necessary to stub out __libc_disable_asynccancel and __libc_enable_asynccancel via rtld-stubbed-symbols because the new direct references to the unwinder result in symbol conflicts when the rtld exception handling from libc is linked in during the construction of librtld.map. unwind-forcedunwind.c is merged into unwind-resume.c. libc now needs the functions that were previously only used in libpthread. The GLIBC_PRIVATE exports of __libc_longjmp and __libc_siglongjmp are no longer needed, so switch them to hidden symbols. The symbol __pthread_unwind_next has been moved using scripts/move-symbol-to-libc.py. Reviewed-by: Adhemerva Zanella <adhemerval.zanella@linaro.org>
* nptl: Move pthread_once and __pthread_once into libcFlorian Weimer2021-04-212-2/+4
| | | | | | | | | | | | | And also the fork generation counter, __fork_generation. This eliminates the need for __fork_generation_pointer. call_once remains in libpthread and calls the exported __pthread_once symbol. pthread_once and __pthread_once have been moved using scripts/move-symbol-to-libc.py. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* nptl: Move legacy cancelation handling into libc as compat symbolsFlorian Weimer2021-04-212-4/+4
| | | | | | | | | | | | | | | This affects _pthread_cleanup_pop, _pthread_cleanup_pop_restore, _pthread_cleanup_push, _pthread_cleanup_push_defer. The symbols have been moved using scripts/move-symbol-to-libc.py. No new symbol versions are added because the symbols are turned into compatibility symbols at the same time. __pthread_cleanup_pop and __pthread_cleanup_push are added as GLIBC_PRIVATE symbols because they are also used internally, for glibc's own cancellation handling. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* nptl: Move __pthread_cleanup_routine into libcFlorian Weimer2021-04-212-1/+2
| | | | Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* nptl: Move pthread_mutex_consistent into libcFlorian Weimer2021-04-212-2/+3
| | | | | | And deprecated pthread_mutex_consistent_np, its old name. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* nptl: Remove __libc_allocate_rtsig, __libc_current_sigrtmax, and ↵Adhemerval Zanella2021-03-261-3/+0
| | | | | | | | __libc_current_sigrtmin The libc version is identical and built with same flags. Checked on x86_64-linux-gnu.
* nptl: Move sigaction to libcAdhemerval Zanella2021-03-261-2/+0
| | | | | | The libc version is identical and built with same flags. Checked on x86_64-linux-gnu.
* nptl: Remove pthread raise implementationAdhemerval Zanella2021-03-261-1/+0
| | | | | | | | | | The Linux version already target the current thread by using tgkill along with getpid and gettid. For arm, libpthread does not do a intra PLT since it will call the raise from libc. Checked on x86_64-linux-gnu.
* nptl: Move pthread_kill to libcAdhemerval Zanella2021-03-262-1/+2
| | | | | | A new 2.34 version is also provided. Checked on x86_64-linux-gnu.
* nptl: Remove pwrite from libpthreadAdhemerval Zanella2021-03-261-3/+0
| | | | | | | The libc version is identical and built with same flags, it is also uses as the default version. Checked on x86_64-linux-gnu.
* nptl: Remove pread from libpthreadAdhemerval Zanella2021-03-261-3/+0
| | | | | | | The libc version is identical and built with same flags, it is also uses as the default version. Checked on x86_64-linux-gnu.
* nptl: Remove open from libpthreadAdhemerval Zanella2021-03-261-4/+0
| | | | | | | The libc version is identical and built with same flags. The libc version is set as the default version. Checked on x86_64-linux-gnu.
* nptl: Remove lseek from libpthreadAdhemerval Zanella2021-03-261-3/+0
| | | | | | | | | | | The libc version is identical and built with same flags. The libc version is set as the default version. The libpthread compat symbol requires to mask it when building the loader object otherwise ld might complain about a missing versioned symbol (as for alpha). Checked on x86_64-linux-gnu.
* nptl: Remove send from libpthreadAdhemerval Zanella2021-03-261-2/+0
| | | | | | | | | | | | | The libc version is identical and built with same flags. Both aarch64 and nios2 also requires to export __send and tt was done previously with the HAVE_INTERNAL_SEND_SYMBOL (which forced the symbol creation). All __send callers are internal to libc and the original issue that required the symbol export was due a missing libc_hidden_def. So a compat symbol is added for __send and the libc_hidden_def is defined regardless. Checked on x86_64-linux-gnu and i686-linux-gnu.
* nptl: Remove sendmsg from libpthreadAdhemerval Zanella2021-03-181-1/+0
| | | | | | The libc version is identical and built with same flags. Checked on x86_64-linux-gnu.
* nptl: Remove recvmsg from libpthreadAdhemerval Zanella2021-03-181-1/+0
| | | | | | The libc version is identical and built with same flags. Checked on x86_64-linux-gnu.
* nptl: Remove sigwait from libpthreadAdhemerval Zanella2021-03-181-1/+0
| | | | | | The libc version is identical and built with same flags. Checked on x86_64-linux-gnu.
* nptl: Remove tcdrain from libpthreadAdhemerval Zanella2021-03-181-1/+0
| | | | | | The libc version is identical and built with same flags. Checked on x86_64-linux-gnu.
* nptl: Remove pause from libpthreadAdhemerval Zanella2021-03-181-1/+0
| | | | | | The libc version is identical and built with same flags. Checked on x86_64-linux-gnu.
* nptl: Remove msync from libpthreadAdhemerval Zanella2021-03-181-1/+0
| | | | | | The libc version is identical and built with same flags. Checked on x86_64-linux-gnu.
* nptl: Remove fsync from libpthreadAdhemerval Zanella2021-03-181-1/+0
| | | | | | The libc version is identical and built with same flags. Checked on x86_64-linux-gnu.
* nptl: Remove sendto from libpthreadAdhemerval Zanella2021-03-181-1/+0
| | | | | | The libc version is identical and built with same flags. Checked on x86_64-linux-gnu.
* nptl: Remove recvfrom from libpthreadAdhemerval Zanella2021-03-181-1/+0
| | | | | | The libc version is identical and built with same flags. Checked on x86_64-linux-gnu.
* nptl: Remove recv from libpthreadAdhemerval Zanella2021-03-181-1/+0
| | | | | | The libc version is identical and built with same flags. Checked on x86_64-linux-gnu.
* nptl: Remove connect from libpthreadAdhemerval Zanella2021-03-181-2/+0
| | | | | | The libc version is identical and built with same flags. Checked on x86_64-linux-gnu.
* nptl: Remove accept from libpthreadAdhemerval Zanella2021-03-181-1/+0
| | | | | | The libc version is identical and built with same flags. Checked on x86_64-linux-gnu.
* nptl: Remove close from libpthreadAdhemerval Zanella2021-03-181-2/+0
| | | | | | The libc version is identical and built with same flags. Checked on x86_64-linux-gnu.
* nptl: Remove read from libpthreadAdhemerval Zanella2021-03-181-2/+0
| | | | | | The libc version is identical and built with same flags. Checked on x86_64-linux-gnu.
* nptl: Remove write from libpthreadAdhemerval Zanella2021-03-181-2/+0
| | | | | | The libc version is identical and built with same flags. Checked on x86_64-linux-gnu.
* Reduce the statically linked startup code [BZ #23323]Florian Weimer2021-02-251-0/+1
| | | | | | | | | | | | | | | | | | | It turns out the startup code in csu/elf-init.c has a perfect pair of ROP gadgets (see Marco-Gisbert and Ripoll-Ripoll, "return-to-csu: A New Method to Bypass 64-bit Linux ASLR"). These functions are not needed in dynamically-linked binaries because DT_INIT/DT_INIT_ARRAY are already processed by the dynamic linker. However, the dynamic linker skipped the main program for some reason. For maximum backwards compatibility, this is not changed, and instead, the main map is consulted from __libc_start_main if the init function argument is a NULL pointer. For statically linked binaries, the old approach based on linker symbols is still used because there is nothing else available. A new symbol version __libc_start_main@@GLIBC_2.34 is introduced because new binaries running on an old libc would not run their ELF constructors, leading to difficult-to-debug issues.
* Update syscall lists for Linux 5.11.Joseph Myers2021-02-191-0/+1
| | | | | | | | Linux 5.11 has one new syscall, epoll_pwait2. Update syscall-names.list and regenerate the arch-syscall.h headers with build-many-glibcs.py update-syscalls. Tested with build-many-glibcs.py.
* linux: Set LFS statfs as defaultAdhemerval Zanella2021-02-111-0/+75
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently glibc has three different struct statfs{64} definitions: 1. Non-LFS support where non-LFS and LFS struct have different size: alpha, arm, hppa, i686, m68k, microblaze, mips (all abis), powerpc32, s390, sh4, and sparc. 2. Non-LFS support where non-LFS and LFS struct have the same size: csky and nios2. 3. Only LFS support (where both struct have the same size): arc, ia64, powerpc64 (including LE), riscv (both 32 and 64 bits), s390x, sparc64, and x86 (including x32). The STATFS_IS_STATFS64/__STATFS_MATCHES_STATFS64 does not tell apart between 1. and 2. since for both the only difference is the struct size (for 2. both non-LFS and LFS uses the same syscall, where for 1. the old non-LFS is used for [f]statfs). This patch move the generic statfs.h for both csky and nios2, and make the default definitions for newer ABIs to assume that only LFS will be support (so there is no need to keep no-LFS and LFS struct statfs with the same size, it will be implicit). This patch does not change the code generation. Reviewed-by: Carlos O'Donell <carlos@redhat.com>
* linux: Set default kernel_stat.h to LFSAdhemerval Zanella2021-02-111-0/+21
| | | | | | | | | | | | | | The XSTAT_IS_XSTAT64 and STAT_IS_KERNEL_STAT flags are now set to 1 and STATFS_IS_STATFS64 is set to __STATFS_MATCHES_STATFS64. This makes the default ABI for newer ports to provide only LFS calls. A copy of non-LFS support is provided to 32-bit ABIS with non-LFS support (arm, csky, i386, m68k, nios2, s390, and sh). Is also allows to remove the 64-bit ports, which already uses the default values. This patch does not change the code generation. Reviewed-by: Carlos O'Donell <carlos@redhat.com>
* Update copyright dates with scripts/update-copyrightsPaul Eggert2021-01-0218-18/+18
| | | | | | | | | | | | | | | | I used these shell commands: ../glibc/scripts/update-copyrights $PWD/../gnulib/build-aux/update-copyright (cd ../glibc && git commit -am"[this commit message]") and then ignored the output, which consisted lines saying "FOO: warning: copyright statement not found" for each of 6694 files FOO. I then removed trailing white space from benchtests/bench-pthread-locks.c and iconvdata/tst-iconv-big5-hkscs-to-2ucs4.c, to work around this diagnostic from Savannah: remote: *** pre-commit check failed ... remote: *** error: lines with trailing whitespace found remote: error: hook declined to update refs/heads/master
* Update syscall lists for Linux 5.10.Joseph Myers2020-12-161-0/+1
| | | | | | | | Linux 5.10 has one new syscall, process_madvise. Update syscall-names.list and regenerate the arch-syscall.h headers with build-many-glibcs.py update-syscalls. Tested with build-many-glibcs.py.