about summary refs log tree commit diff
Commit message (Collapse)AuthorAgeFilesLines
...
* S390: Don't test nanoseconds in io/tst-stat.cStefan Liebler2021-03-264-2/+40
| | | | | | | | | | | Both new tests io/tst-stat and io/tst-stat-lfs (_FILE_OFFSET_BITS=64) are comparing the nanosecond fields with the statx result. Unfortunately on s390(31bit) those fields are always zero if old KABI with non-LFS support is used. With _FILE_OFFSET_BITS=64 stat is using statx internally. As suggested by Adhemerval this patch disables the nanosecond check for s390(31bit). Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* Support for multiple versions in versioned_symbol, compat_symbolFlorian Weimer2021-03-2514-67/+197
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This essentially folds compat_symbol_unique functionality into compat_symbol. This change eliminates the need for intermediate aliases for defining multiple symbol versions, for both compat_symbol and versioned_symbol. Some binutils versions do not suport multiple versions per symbol on some targets, so aliases are automatically introduced, similar to what compat_symbol_unique did. To reduce symbol table sizes, a configure check is added to avoid these aliases if they are not needed. The new mechanism works with data symbols as well as function symbols, due to the way an assembler-level redirect is used. It is not compatible with weak symbols for old binutils versions, which is why the definition of __malloc_initialize_hook had to be changed. This is not a loss of functionality because weak symbols do not matter to dynamic linking. The placeholder symbol needs repeating in nptl/libpthread-compat.c now that compat_symbol is used, but that seems more obvious than introducing yet another macro. A subtle difference was that compat_symbol_unique made the symbol global automatically. compat_symbol does not do this, so static had to be removed from the definition of __libpthread_version_placeholder. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* locale: Use compat_symbol_reference in _nl_postload_ctypeFlorian Weimer2021-03-251-6/+8
| | | | | | | | | | | These symbol usages are not definitions, so compat_symbol_reference is more appropriate than compat_symbol. compat_symbol_reference is also safe to emit multiple times (in case the inline assembly is duplicated; this is possible because it is nested in a function). compat_symbol does not necessarily have this property because it is intended to provide a symbol definition. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* Change how the symbol_version_reference macro is definedFlorian Weimer2021-03-253-13/+44
| | | | | | | | | | | | A subsequent change will require including <config.h> for defining symbol_version_reference. <libc-symbol.h> should not include <config.h> for _ISOMAC, so it cannot define symbol_version_reference anymore, but symbol_version_reference is needed <shlib-compat.h> even for _ISOMAC. Moving the definition of symbol_version_reference to a separate file <libc-symver.h> makes it possible to use a single definition for both cases. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* stdlib: Fix BZ #26241 testcase on GNU/HurdSamuel Thibault2021-03-241-3/+4
| | | | | | | | GNU/Hurd's readlink system call is partly implemented in userspace, which also allocates a buffer on the stack for the result, and thus needs one more path. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* elf: Fix not compiling ifunc tests that need gcc ifunc supportSamuel Thibault2021-03-245-21/+17
|
* htl: Add missing fork.hSamuel Thibault2021-03-241-0/+20
| | | | | | | | 2b47727c68b6 ("posix: Consolidate register-atfork") introduced a fork.h header to declare the atfork unregister hook, but was missing adding it for htl. This fixes tst-atfork2.
* hurd: handle EINTR during critical sectionsSamuel Thibault2021-03-2329-4/+139
| | | | | | | | | During critical sections, signal handling is deferred and thus RPCs return EINTR, even if SA_RESTART is set. We thus have to restart the whole critical section in that case. This also adds HURD_CRITICAL_UNLOCK in the cases where one wants to break the section in the middle.
* tst: Add test for sigtimedwaitLukasz Majewski2021-03-232-1/+63
| | | | | | | | | | | | | This change adds new test to assess sigtimedwait's timeout related functionality - the sigset_t is configured for SIGUSR1, which will not be triggered, so sigtimedwait just waits for timeout. To be more specific - two use cases are checked: - if sigtimedwait times out immediately when passed struct timespec has zero values of tv_nsec and tv_sec. - if sigtimedwait times out after timeout specified in passed argument Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* tst: Provide test for selectLukasz Majewski2021-03-232-1/+72
| | | | | | | | | | | | | | This change adds new test to assess select()'s timeout related functionality (the rdfs set provides valid fd - stderr - but during normal program operation there is no data to be read, so one just waits for timeout). To be more specific - two use cases are checked: - if select() times out immediately when passed struct timeval has zero values of tv_usec and tv_sec. - if select() times out after timeout specified in passed argument Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* tst: Add test for ntp_gettimexLukasz Majewski2021-03-232-1/+23
| | | | | | This test is a wrapper on tst-ntp_gettime test. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* tst: Add test for ntp_gettimeLukasz Majewski2021-03-232-1/+57
| | | | | | | This code provides test to check if time on target machine is properly read via ntp_gettime syscall. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* fix: Always export ntp_gettimex functionLukasz Majewski2021-03-231-1/+1
| | | | | | After this patch applied the ntp_gettimex function is always declared in the sys/timex.h header. Currently it is not when __REDIRECT_NTH is defined (i.e. in ARM 32 bit port).
* nptl: Remove MULTI_PAGE_ALIASING [BZ #23554]H.J. Lu2021-03-194-57/+0
| | | | | MULTI_PAGE_ALIASING was introduced to mitigate an aliasing issue on Pentium 4. It is no longer needed for processors after Pentium 4.
* elf: Add EM_INTELGT for Intel Graphics TechnologyH.J. Lu2021-03-191-1/+2
| | | | | | | Add EM_INTELGT (205) for Intel Graphics Technology which has been added to gABI: https://groups.google.com/g/generic-abi/c/ofBevXA48dM
* support: Use syscall function instead of INLINE_SYSCALL_CALLAdhemerval Zanella2021-03-181-1/+1
| | | | | It fixes the build on ARM in thumb mode that requires an out of the line helper (__libc_do_syscall) to issue the syscall.
* signal: Add __libc_sigactionAdhemerval Zanella2021-03-1814-23/+48
| | | | | | | | The generic implementation basically handle the system agnostic logic (filtering out the invalid signals) while the __libc_sigaction is the function with implements the system and architecture bits. Checked on x86_64-linux-gnu and i686-linux-gnu.
* nptl: Move system to libcAdhemerval Zanella2021-03-1828-74/+0
| | | | | | The libc version is identical and built with same flags. Checked on x86_64-linux-gnu.
* nptl: Move fcntl from libpthreadAdhemerval Zanella2021-03-1829-106/+0
| | | | | | The libc version is identical and built with same flags. Checked on x86_64-linux-gnu.
* nptl: Remove sendmsg from libpthreadAdhemerval Zanella2021-03-1832-32/+1
| | | | | | The libc version is identical and built with same flags. Checked on x86_64-linux-gnu.
* nptl: Remove recvmsg from libpthreadAdhemerval Zanella2021-03-1832-32/+2
| | | | | | The libc version is identical and built with same flags. Checked on x86_64-linux-gnu.
* nptl: Remove sigwait from libpthreadAdhemerval Zanella2021-03-1831-31/+1
| | | | | | The libc version is identical and built with same flags. Checked on x86_64-linux-gnu.
* nptl: Remove tcdrain from libpthreadAdhemerval Zanella2021-03-1831-32/+1
| | | | | | The libc version is identical and built with same flags. Checked on x86_64-linux-gnu.
* nptl: Remove pause from libpthreadAdhemerval Zanella2021-03-1831-32/+1
| | | | | | The libc version is identical and built with same flags. Checked on x86_64-linux-gnu.
* nptl: Remove msync from libpthreadAdhemerval Zanella2021-03-1831-32/+1
| | | | | | The libc version is identical and built with same flags. Checked on x86_64-linux-gnu.
* nptl: Remove fsync from libpthreadAdhemerval Zanella2021-03-1831-32/+1
| | | | | | The libc version is identical and built with same flags. Checked on x86_64-linux-gnu.
* nptl: Remove sendto from libpthreadAdhemerval Zanella2021-03-1832-32/+2
| | | | | | The libc version is identical and built with same flags. Checked on x86_64-linux-gnu.
* nptl: Remove recvfrom from libpthreadAdhemerval Zanella2021-03-1832-32/+2
| | | | | | The libc version is identical and built with same flags. Checked on x86_64-linux-gnu.
* nptl: Remove recv from libpthreadAdhemerval Zanella2021-03-1832-32/+3
| | | | | | The libc version is identical and built with same flags. Checked on x86_64-linux-gnu.
* nptl: Remove connect from libpthreadAdhemerval Zanella2021-03-1832-62/+2
| | | | | | The libc version is identical and built with same flags. Checked on x86_64-linux-gnu.
* nptl: Remove accept from libpthreadAdhemerval Zanella2021-03-1832-32/+1
| | | | | | The libc version is identical and built with same flags. Checked on x86_64-linux-gnu.
* nptl: Remove close from libpthreadAdhemerval Zanella2021-03-1833-64/+4
| | | | | | The libc version is identical and built with same flags. Checked on x86_64-linux-gnu.
* nptl: Remove read from libpthreadAdhemerval Zanella2021-03-1832-63/+2
| | | | | | The libc version is identical and built with same flags. Checked on x86_64-linux-gnu.
* nptl: Remove write from libpthreadAdhemerval Zanella2021-03-1834-65/+4
| | | | | | The libc version is identical and built with same flags. Checked on x86_64-linux-gnu.
* benchtests: Add ilogb* testsRaphael Moreira Zinsly2021-03-164-2/+35
| | | | Add a benchtest to ilogb, ilogbf and ilogbf128 based on the logb* benchtests.
* powerpc: Add optimized llogb* for POWER9Raphael Moreira Zinsly2021-03-162-0/+43
| | | | | The POWER9 builtins used to improve the ilogb* functions can be used in the llogb* functions as well.
* powerpc: Add optimized ilogb* for POWER9Raphael Moreira Zinsly2021-03-163-1/+59
| | | | | | The instructions xsxexpdp and xsxexpqp introduced on POWER9 extract the exponent from a double-precision and quad-precision floating-point respectively, thus they can be used to improve ilogb, ilogbf and ilogbf128.
* glibcymbols.read_abilist: Add check for duplicate symbolsFlorian Weimer2021-03-161-1/+4
| | | | | | This detects some bogus abilist files. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* scripts/glibcsymbols.py: Extract from scripts/move-symbol-to-libc.pyFlorian Weimer2021-03-162-62/+93
| | | | Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* Legacy unwinder: Remove definition of _Unwind_GetCFAFlorian Weimer2021-03-161-8/+0
| | | | | | | | It is not actually used by the legacy unwinder linked into libc.so, and it conflicts with the unwind-link functionality in libpthread. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* support: Pass environ to child processSiddhesh Poyarekar2021-03-161-1/+1
| | | | | Pass environ to posix_spawn so that the child process can inherit environment of the test.
* powerpc: Update libm-test-ulpsMatheus Castanho2021-03-161-1/+1
| | | | | | Generated with 'make regen-ulps' on POWER8. Tested on powerpc, powerpc64, and powerpc64le
* Build libc-start with stack protector for SHAREDSiddhesh Poyarekar2021-03-153-14/+20
| | | | | | | | | | This does not change the emitted code since __libc_start_main does not return, but is important for formal flags compliance. This also cleans up the cosmetic inconsistency in the stack protector flags in csu, especially the incorrect value of STACK_PROTECTOR_LEVEL. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* Build get-cpuid-feature-leaf.c without stack-protector [BZ #27555]Siddhesh Poyarekar2021-03-152-0/+4
| | | | | | | | | | | | | | | __x86_get_cpuid_feature_leaf is called during early startup, before the stack check guard is initialized and is hence not safe to build with stack-protector. Additionally, IFUNC resolvers for static tst-ifunc-isa tests get called too early for stack protector to be useful, so fix them to disable stack protector for the resolver functions. This fixes all failures seen with --enable-stack-protector=all configuration. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* Add inhibit_stack_protector to ifuncmain9 [BZ #25680]David Hughes2021-03-151-0/+1
| | | | | | | | | | | | | | | | | Enabling --enable-stack-protector=all causes the following tests to fail: FAIL: elf/ifuncmain9picstatic FAIL: elf/ifuncmain9static Nick Alcock (who committed the stack protector code) marked the IFUNC resolvers with inhibit_stack_protector when he done the original work and suggested doing so again @ BZ #25680. This patch adds inhibit_stack_protector to ifuncmain9. After patch is applied, --enable-stack-protector=all does not fail the above tests. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* support: Typo and formatting fixesSiddhesh Poyarekar2021-03-152-4/+4
| | | | | - Add a newline to the end of error messages in transfer(). - Fixed the name of support_subprocess_init().
* elf: ld.so --help calls _dl_init_paths without a main map [BZ #27577]Florian Weimer2021-03-152-3/+23
| | | | | | | | | | | In this case, use the link map of the dynamic loader itself as a replacement. This is more than just a hack: if we ever support DT_RUNPATH/DT_RPATH for the dynamic loader, reporting it for ld.so --help (without further command line arguments) would be the right thing to do. Fixes commit 332421312576bd7095e70589154af99b124dd2d1 ("elf: Always set l in _dl_init_paths (bug 23462)").
* x86: Handle _SC_LEVEL1_ICACHE_LINESIZE [BZ #27444]H.J. Lu2021-03-157-0/+79
| | | | | | | | | | | | | | | | | commit 2d651eb9265d1366d7b9e881bfddd46db9c1ecc4 Author: H.J. Lu <hjl.tools@gmail.com> Date: Fri Sep 18 07:55:14 2020 -0700 x86: Move x86 processor cache info to cpu_features missed _SC_LEVEL1_ICACHE_LINESIZE. 1. Add level1_icache_linesize to struct cpu_features. 2. Initialize level1_icache_linesize by calling handle_intel, handle_zhaoxin and handle_amd with _SC_LEVEL1_ICACHE_LINESIZE. 3. Return level1_icache_linesize for _SC_LEVEL1_ICACHE_LINESIZE. Reviewed-by: Carlos O'Donell <carlos@redhat.com>
* elf: Always set l in _dl_init_paths (bug 23462)Carlos O'Donell2021-03-123-35/+65
| | | | | | | | | | | | | | | After d1d5471579eb0426671bf94f2d71e61dfb204c30 ("Remove dead DL_DST_REQ_STATIC code.") we always setup the link map l to make the static and shared cases the same. The bug is that in elf/dl-load.c (_dl_init_paths) we conditionally set l only in the #ifdef SHARED case, but unconditionally use it later. The simple solution is to remove the #ifdef SHARED conditional, because it's no longer needed, and unconditionally setup l for both the static and shared cases. A regression test is added to run a static binary with LD_LIBRARY_PATH='$ORIGIN' which crashes before the fix and runs after the fix. Co-Authored-By: Florian Weimer <fweimer@redhat.com>
* s390x: Regenerate ULPs.Stefan Liebler2021-03-121-1/+3
| | | | | | | Updates needed after recent commit: db3f7bb5586392d9809fc6397c7184983aed6008 "math: Remove slow paths from asin and acos [BZ #15267]" Compre to the required ulps update for x86_64.