about summary refs log tree commit diff
Commit message (Collapse)AuthorAgeFilesLines
* Add --with-rtld-early-cflags configure optionFlorian Weimer2022-01-147-0/+49
| | | | | Reviewed-by: H.J. Lu <hjl.tools@gmail.com> Reviewed-by: Carlos O'Donell <carlos@redhat.com>
* elf: Split dl-printf.c from dl-misc.cFlorian Weimer2022-01-143-277/+297
| | | | | | | This allows to use different compiler flags for the diagnostics code. Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
* elf/Makefile: Reflow and sort most variable assignmentsFlorian Weimer2022-01-141-102/+318
| | | | Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
* Generate gcc-macros.hFlorian Weimer2022-01-141-0/+9
| | | | | | | | The file can be used to check the effect of the default compiler flags on code generation even in areas of the build that uses non-default compiler flags. Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
* x86: HAVE_X86_LAHF_SAHF, HAVE_X86_MOVBE and -march=x86-64-vN (bug 28782)Florian Weimer2022-01-142-4/+4
| | | | | | | | | | HAVE_X86_LAHF_SAHF is implied by x86-64-v2, and HAVE_X86_MOVBE by x86-64-v3. The individual flag does not appear in -fverbose-asm flag output even if the ISA level implies it. Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
* math: Add more inputs to atan2 accuracy tests [BZ #28765]Sunil K Pandey2022-01-143-4/+800
| | | | | | | | | | | | | | | This patch adds following inputs: 0x1.bcab29da0e947p-54 0x1.bc41f4d2294b8p-54 0x1.a11891ec004d4p-348 0x1.814830510be26p-348 0x1.b836ed678be29p-588 0x1.b7be6f5a03a8cp-588 0x1.a83f842ef3f73p-633 0x1.a799d8a6677ep-633 to atan2 tests and updates x86_64 double atan2 ulps. This fixes BZ #28765. Reviewed-By: Paul Zimmermann <Paul.Zimmermann@inria.fr>
* Disable debuginfod in printer tests [BZ #28757]H.J. Lu2022-01-141-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | With gdb-11.1-6.fc35.x86_64, I got FAIL: nptl/test-cond-printers FAIL: nptl/test-condattr-printers FAIL: nptl/test-mutex-printers FAIL: nptl/test-mutexattr-printers FAIL: nptl/test-rwlock-printers FAIL: nptl/test-rwlockattr-printers $ cat nptl/test-condattr-printers.out Error: Response does not match the expected pattern. Command: start Expected pattern: main Response: Temporary breakpoint 1 at 0x11d5: file test-condattr-printers.c, line 43. Starting program: /export/build/gnu/tools-build/glibc-cet-gitlab/build-x86_64-linux/nptl/test-condattr-printers This GDB supports auto-downloading debuginfo from the following URLs: https://debuginfod.fedoraproject.org/ Enable debuginfod for this session? (y or [n]) Disable debuginfod to avoid GDB messages. This fixes BZ #28757. Reviewed-by: Florian Weimer <fweimer@redhat.com>
* Update syscall lists for Linux 5.16Joseph Myers2022-01-1327-2/+29
| | | | | | | | Linux 5.16 has one new syscall, futex_waitv. Update syscall-names.list and regenerate the arch-syscall.h headers with build-many-glibcs.py update-syscalls. Tested with build-many-glibcs.py.
* i386: Remove broken CAN_USE_REGISTER_ASM_EBP (bug 28771)Florian Weimer2022-01-134-255/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The configure check for CAN_USE_REGISTER_ASM_EBP tried to compile a simple function that uses %ebp as an inline assembly operand. If compilation failed, CAN_USE_REGISTER_ASM_EBP was set 0, which eventually had these consequences: (1) %ebx was avoided as an inline assembly operand, with an assembler macro hack to avoid unnecessary register moves. (2) %ebp was avoided as an inline assembly operand, using an out-of-line syscall function for 6-argument system calls. (1) is no longer needed for any GCC version that is supported for building glibc. %ebx can be used directly as a register operand. Therefore, this commit removes the %ebx avoidance completely. This avoids the assembler macro hack, which turns out to be incompatible with the current Systemtap probe macros (which switch to .altmacro unconditionally). (2) is still needed in many build configurations. The existing configure check cannot really capture that because the simple function succeeds to compile, while the full glibc build still fails. Therefore, this commit removes the check, the CAN_USE_REGISTER_ASM_EBP macro, and uses the out-of-line syscall function for 6-argument system calls unconditionally. Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
* stdlib: Fix formatting of tests list in MakefileSiddhesh Poyarekar2022-01-131-75/+77
| | | | | Signed-off-by: Siddhesh Poyarekar <siddhesh@sourceware.org> Reviewed-by: Florian Weimer <fweimer@redhat.com>
* stdlib: Sort tests in MakefileSiddhesh Poyarekar2022-01-131-24/+75
| | | | | | Put one test per line and sort them. Signed-off-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
* x86_64: Fix SSE4.2 libmvec atan2 function accuracy [BZ #28765]Sunil K Pandey2022-01-121-148/+173
| | | | | | | | | | | | This patch fixes SSE4.2 libmvec atan2 function accuracy for following inputs to less than 4 ulps. {0x1.bcab29da0e947p-54,0x1.bc41f4d2294b8p-54} 4.19888 ulps {0x1.b836ed678be29p-588,0x1.b7be6f5a03a8cp-588} 4.09889 ulps This fixes BZ #28765. Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
* debug: Synchronize feature guards in fortified functions [BZ #28746]Siddhesh Poyarekar2022-01-126-15/+58
| | | | | | | | | | | | | | | | | | Some functions (e.g. stpcpy, pread64, etc.) had moved to POSIX in the main headers as they got incorporated into the standard, but their fortified variants remained under __USE_GNU. As a result, these functions did not get fortified when _GNU_SOURCE was not defined. Add test wrappers that check all functions tested in tst-chk0 at all levels with _GNU_SOURCE undefined and then use the failures to (1) exclude checks for _GNU_SOURCE functions in these tests and (2) Fix feature macro guards in the fortified function headers so that they're the same as the ones in the main headers. This fixes BZ #28746. Signed-off-by: Siddhesh Poyarekar <siddhesh@sourceware.org> Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* debug: Autogenerate _FORTIFY_SOURCE testsSiddhesh Poyarekar2022-01-1216-67/+73
| | | | | | | | | | | | | Rename debug/tst-chk1.c to debug/tst-fortify.c and add make hackery to autogenerate tests with different macros enabled to build and run the same test with different configurations as well as different fortification levels. The change also ends up expanding the -lfs tests to include _FORTIFY_SOURCE=3. Signed-off-by: Siddhesh Poyarekar <siddhesh@sourceware.org> Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* Do not build libresolv module with 64 bit time_t flagsAdhemerval Zanella2022-01-121-1/+1
| | | | | | | It is not used to build installed programs. It also fixes resolv/tst-p_secstodate on big endian machines. Checked on i686-linux-gnu and powerpc-linux-gnu-power4.
* Revert "linux: Fix ancillary 64-bit time timestamp conversion (BZ #28349, BZ ↵Adhemerval Zanella2022-01-124-354/+5
| | | | | | #28350)" This reverts commit 21e0f45c7d73df6fe30c77ffcc9f81410e2ee369.
* Revert "support: Add support_socket_so_timestamp_time64"Adhemerval Zanella2022-01-123-61/+0
| | | | This reverts commit a4cf12360fb7a8eae4fa4923763309b7f10797c3.
* timezone: Fix tst-bz28707 Makefile ruleAdhemerval Zanella2022-01-121-1/+2
| | | | | The $(testdata)/XT5 rule is ambiguous and it may not be correct evaluated.
* linux: Fix ancillary 64-bit time timestamp conversion (BZ #28349, BZ #28350)Adhemerval Zanella2022-01-124-5/+354
| | | | | | | | | | | | | | | | | | The __convert_scm_timestamps() only updates the control message last pointer for SOL_SOCKET type, so if the message control buffer contains multiple ancillary message types the converted timestamp one might overwrite a valid message. The test check if the extra ancillary space is correctly handled by recvmsg/recvmmsg, where if there is no extra space for the 64-bit time_t converted message the control buffer should be marked with MSG_TRUNC. It also check if recvmsg/recvmmsg handle correctly multiple ancillary data. Checked on x86_64-linux and on i686-linux-gnu on both 5.11 and 4.15 kernel. Co-authored-by: Fabian Vogt <fvogt@suse.de>
* support: Add support_socket_so_timestamp_time64Adhemerval Zanella2022-01-123-0/+61
| | | | | | Check if the socket support 64-bit network packages timestamps (SO_TIMESTAMP and SO_TIMESTAMPNS). This will be used on recvmsg and recvmmsg tests to check if the timestamp should be generated.
* elf: Fix 64 time_t support for installed statically binariesAdhemerval Zanella2022-01-126-39/+39
| | | | | | | | | | | The usage of internal static symbol for statically linked binaries does not work correctly for objects built with -D_TIME_BITS=64, since the internal definition does not provide the expected aliases. This patch makes it to use the default stat functions instead (which uses the default 64 time_t alias and types). Checked on i686-linux-gnu.
* Enable _FORTIFY_SOURCE=3 for gcc 12 and aboveSiddhesh Poyarekar2022-01-122-2/+5
| | | | | | | | gcc 12 now has support for the __builtin_dynamic_object_size builtin. Adapt the macro checks to enable _FORTIFY_SOURCE=3 on gcc 12 and above. Signed-off-by: Siddhesh Poyarekar <siddhesh@sourceware.org> Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* manual: Drop obsolete @refillSiddhesh Poyarekar2022-01-1210-21/+21
| | | | | | | | The @refill command has been obsolete for a while and now texinfo has started warning about it. Reviewed-by: Florian Weimer <fweimer@redhat.com> Signed-off-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
* aarch64: Add HWCAP2_ECV from Linux 5.16Szabolcs Nagy2022-01-111-0/+1
| | | | | | Indicates the availability of enhanced counter virtualization extension of armv8.6-a with self-synchronized virtual counter CNTVCTSS_EL0 usable in userspace.
* Use Linux 5.16 in build-many-glibcs.pyJoseph Myers2022-01-111-1/+1
| | | | | | | This patch makes build-many-glibcs.py use Linux 5.16. Tested with build-many-glibcs.py (host-libraries, compilers and glibcs builds).
* x86: Fix __wcsncmp_evex in strcmp-evex.S [BZ# 28755]Noah Goldstein2022-01-101-0/+10
| | | | | | | | | | Fixes [BZ# 28755] for wcsncmp by redirecting length >= 2^56 to __wcscmp_evex. For x86_64 this covers the entire address range so any length larger could not possibly be used to bound `s1` or `s2`. test-strcmp, test-strncmp, test-wcscmp, and test-wcsncmp all pass. Signed-off-by: Noah Goldstein <goldstein.w.n@gmail.com>
* x86: Fix __wcsncmp_avx2 in strcmp-avx2.S [BZ# 28755]Noah Goldstein2022-01-101-0/+10
| | | | | | | | | | Fixes [BZ# 28755] for wcsncmp by redirecting length >= 2^56 to __wcscmp_avx2. For x86_64 this covers the entire address range so any length larger could not possibly be used to bound `s1` or `s2`. test-strcmp, test-strncmp, test-wcscmp, and test-wcsncmp all pass. Signed-off-by: Noah Goldstein <goldstein.w.n@gmail.com>
* math: Fix float conversion regressions with gcc-12 [BZ #28713]Szabolcs Nagy2022-01-1016-32/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Converting double precision constants to float is now affected by the runtime dynamic rounding mode instead of being evaluated at compile time with default rounding mode (except static object initializers). This can change the computed result and cause performance regression. The known correctness issues (increased ulp errors) are already fixed, this patch fixes remaining cases of unnecessary runtime conversions. Add float M_* macros to math.h as new GNU extension API. To avoid conversions the new M_* macros are used and instead of casting double literals to float, use float literals (only required if the conversion is inexact). The patch was tested on aarch64 where the following symbols had new spurious conversion instructions that got fixed: __clog10f __gammaf_r_finite@GLIBC_2.17 __j0f_finite@GLIBC_2.17 __j1f_finite@GLIBC_2.17 __jnf_finite@GLIBC_2.17 __kernel_casinhf __lgamma_negf __log1pf __y0f_finite@GLIBC_2.17 __y1f_finite@GLIBC_2.17 cacosf cacoshf casinhf catanf catanhf clogf gammaf_positive Fixes bug 28713. Reviewed-by: Paul Zimmermann <Paul.Zimmermann@inria.fr>
* elf: Simplify software TM implementation in _dl_find_objectFlorian Weimer2022-01-101-36/+20
| | | | | | | | | | | | | With the current set of fences, the version update at the start of the TM write operation is redundant, and the version update at the end does not need to use an atomic read-modify-write operation. Also use relaxed MO stores during the dlclose update, and skip any version changes there. Suggested-by: Szabolcs Nagy <szabolcs.nagy@arm.com> Reviewed-by: Szabolcs Nagy <szabolcs.nagy@arm.com>
* Restore ENTRY_POINT definition on hppa, ia64 (bug 28749)Florian Weimer2022-01-072-0/+16
| | | | | ENTRY_POINT is still needed for elf/rtld.c. Fixes commit 4fb4e7e821e3 ("csu: Always use __executable_start in gmon-start.c").
* elf: Fix fences in _dl_find_object_update (bug 28745)Florian Weimer2022-01-073-77/+133
| | | | | | | | | | | | | | | | | | | | | | As explained in Hans Boehm, Can Seqlocks Get Along with Programming Language Memory Models?, an acquire fence is needed in _dlfo_read_success. The lack of a fence resulted in an observable bug on powerpc64le compile-time load reordering. The fence in _dlfo_mappings_begin_update has been reordered, turning the fence/store sequence into a release MO store equivalent. Relaxed MO loads are used on the reader side, and relaxed MO stores on the writer side for the shared data, to avoid formal data races. This is just to be conservative; it should not actually be necessary given how the data is used. This commit also fixes the test run time. The intent was to run it for 3 seconds, but 0.3 seconds was enough to uncover the bug very occasionally (while 3 seconds did not reliably show the bug on every test run). Reviewed-by: Szabolcs Nagy <szabolcs.nagy@arm.com>
* ttydefaults.h: Fix CSTATUS to control-tSamuel Thibault2022-01-071-5/+1
| | | | | 4.4BSD actually defaults CSTATUS to control-t, so our generic header should as well.
* AArch64: Check for SVE in ifuncs [BZ #28744]Wilco Dijkstra2022-01-063-3/+3
| | | | | Add a check for SVE in the A64FX ifuncs for memcpy, memset and memmove. This fixes BZ #28744.
* debug: Remove catchsegv and libSegfault (BZ #14913)Adhemerval Zanella2022-01-0622-3438/+6
| | | | | | | | | | | | Trapping SIGSEGV within the process is error-prone, adds security issues, and modern analysis design tends to happen out of the process (either by attaching a debugger or by post-mortem analysis). The libSegfault also has some design problems, it uses non async-signal-safe function (backtrace) on signal handler. There are multiple alternatives if users do want to use similar functionality, such as sigsegv gnulib module or libsegfault.
* Documentation for OpenRISC portStafford Horne2022-01-052-0/+10
| | | | | | | | | | | | | | | | OpenRISC architecture specification: https://raw.githubusercontent.com/openrisc/doc/master/openrisc-arch-1.3-rev1.pdf Currently the port as of the 2022-01-03 rebasing there are no known architecture specific test failures. Writing credits for the port are: Stafford Horne <shorne@gmail.com> Christian Svensson <blue@cmd.nu> Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* build-many-glibcs.py: add OpenRISC supportStafford Horne2022-01-051-0/+5
| | | | Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* or1k: Build InfrastructureStafford Horne2022-01-059-0/+63
| | | | | | | | | | Here we define the minumum linux kernel version at 5.4.0, as that is the long term support version where 32-bit architectures start to support 64-bit time API's. The OpenRISC kernel had some bugs up until version 5.8 which caused issues with glibc fork/clone, they have been backported to 5.4 but not previous versions. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* or1k: ABI listsStafford Horne2022-01-0510-0/+3095
| | | | Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* or1k: Linux ABIStafford Horne2022-01-0510-0/+555
| | | | Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* or1k: Linux Syscall InterfaceStafford Horne2022-01-056-0/+738
| | | | Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* or1k: math soft float supportStafford Horne2022-01-057-0/+1333
| | | | | | | | OpenRISC support hard float but I will like to submit that after glibc soft float goes upstream. The hard float support depends on adding user access to the FPCSR, which is not supported by the kernel yet. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* or1k: Atomics and Locking primitivesStafford Horne2022-01-051-0/+71
| | | | Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* or1k: Thread Local Storage supportStafford Horne2022-01-054-0/+279
| | | | | | | | OpenRISC includes 3 TLS addressing models. Local Dynamic optimizations are not done in the linker and therefore use the same code sequences as Global Dynamic. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* or1k: startup and dynamic linking codeStafford Horne2022-01-057-0/+666
| | | | | | Code for C runtime startup and dynamic loading including PLT layout. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* or1k: ABI ImplementationStafford Horne2022-01-0512-0/+419
| | | | | | This code deals with the OpenRISC ABI. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* linux/syscalls: Add or1k_atomic syscall for OpenRISCStafford Horne2022-01-051-0/+1
| | | | Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* elf: Add reloc for OpenRISCStafford Horne2022-01-051-0/+37
| | | | Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* elf: Add a comment after trailing backslashesH.J. Lu2022-01-041-0/+4
|
* elf: Also try DT_RUNPATH for LD_AUDIT dlopen [BZ #28455]H.J. Lu2022-01-043-3/+24
| | | | | | | | | | | DT_RUNPATH is only used to find the immediate dependencies of the executable or shared object containing the DT_RUNPATH entry. Update LD_AUDIT dlopen call to try the DT_RUNPATH entry of the executable. Add tst-audit14a, which is copied from tst-audit14, to DT_RUNPATH and build tst-audit14 with -Wl,--disable-new-dtags to test DT_RPATH. This partially fixes BZ #28455.
* elf: Fix tst-linkall-static link when pthread is not in libcSamuel Thibault2022-01-041-0/+4
| | | | In that case we want to link in libanl.a, thus providing getaddrinfo_a.