about summary refs log tree commit diff
Commit message (Collapse)AuthorAgeFilesLines
* powerpc: Move cache line size to rtld_global_roTulio Magno Quites Machado Filho2020-01-1720-67/+312
| | | | | | | | | | | | | | GCC 10.0 enabled -fno-common by default and this started to point that __cache_line_size had been implemented in 2 different places: loader and libc. In order to avoid this duplication, the libc variable has been removed and the loader variable is moved to rtld_global_ro. File sysdeps/unix/sysv/linux/powerpc/dl-auxv.h has been added in order to reuse code for both static and dynamic linking scenarios. Reviewed-by: Carlos O'Donell <carlos@redhat.com>
* powerpc: Initialize rtld_global_ro for static dlopen [BZ #20802]Tulio Magno Quites Machado Filho2020-01-171-2/+11
| | | | | | | Initialize dl_auxv, dl_hwcap and dl_hwcap2 in rtld_global_ro for DSOs that have been statically dlopen'ed. Reviewed-by: Carlos O'Donell <carlos@redhat.com>
* Revert outdated translationsSiddhesh Poyarekar2020-01-1716-38597/+54712
| | | | | | The update-translation target seems to have downloaded outdated translations for these languages. Revert them and try to figure out if this is a problem with the target or an error in translations.
* vcs-to-changelog: Add quirk for __nonnullSiddhesh Poyarekar2020-01-171-0/+2
| | | | | The parser cannot identify the __nonnull off the bat and confuses __typeof in the change db25266c9 to be a function declaration.
* elf: Add elf/tst-dlopenfail-2 [BZ #25396]Florian Weimer2020-01-163-2/+83
| | | | | | | | | | | | | Without CET, a jump into a newly loaded object through an overwritten link map often does not crash, it just executes some random code. CET detects this in some cases because the function pointer does not point to the start of a function in the replacement shared object, so there is no ENDBR instruction. The new test uses a small shared object and the existing dangling link map to trigger the bug. Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
* Clear GL(dl_initfirst) when freeing its link_map memory [BZ# 25396]H.J. Lu2020-01-161-0/+4
| | | | | | | | We should clear GL(dl_initfirst) when freeing its link_map memory. Tested on Fedora 31/x86-64 with CET. Reviewed-by: Florian Weimer <fweimer@redhat.com>
* Update TranslationsSiddhesh Poyarekar2020-01-1627-57666/+40739
| | | | Update translations from translationproject.org for 2.30.9000.
* htl: Add internal version of __pthread_mutex_timedlockSamuel Thibault2020-01-134-2/+7
| | | | The C11 threads implementation will need it.
* htl: Avoid crashing when passed invalid pthread_t valuesSamuel Thibault2020-01-131-2/+4
|
* Update build-many-glibcs.py for GCC move to git.Joseph Myers2020-01-131-10/+17
| | | | | | | This patch updates build-many-glibcs.py for the move of GCC to git, teaching it to do the initial checkout from git, to replace an SVN checkout with a git one if --replace-sources is used, and to get the commit identifier from a git checkout after updating it.
* Fix "elf: Add tst-ldconfig-ld_so_conf-update test" on 32bit.Stefan Liebler2020-01-131-2/+4
| | | | | | | | | | This new test was introduced with recent commit 591236f1a33f11cc65ccf009d997071ba853e186. If run on 32bit, it fails while renaming tst-ldconfig-ld-mod.so as there is no /usr/lib64 directory. This patch is constructing the file name with help of support_libdir_prefix. Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
* htl: Avoid exposing unixoid functionsSamuel Thibault2020-01-135-4/+7
| | | | C11 threads should not expose them.
* htl: Add type sizes in bits/pthreadtypes-arch.h and check themSamuel Thibault2020-01-1314-0/+42
|
* htl: Add internal versions of functions used by C11 threadsSamuel Thibault2020-01-134-2/+7
| | | | | The C11 threads implementation needs to call pthread_join and pthread_key_delete without exposing them.
* Update timezone/READMEPaul Eggert2020-01-092-6/+9
| | | | | | | * timezone/version: New file, also taken from tzcode2018i. * timezone/README: Reword so that people needn't paw through old ChangeLog files to see which version we're using, a process that is error-prone. Update an obsolescent URL.
* elf: Add tst-ldconfig-ld_so_conf-update testAlexandra Hájková2020-01-095-3/+132
| | | | | | | | Test ldconfig after /etc/ld.so.conf update and verify a running process observes changes to /etc/ld.so.cache. The test uses the test-in-container framework. Reviewed-by: Arjun Shankar <arjun@redhat.com>
* Revise NEWS description of changes to gettimeofday etc.Zack Weinberg2020-01-091-25/+38
| | | | | | | | | | | | | | | Mostly English grammar and style improvements. The bullet list is reorganized a little for clarity. The details of exactly which Linux-based ports still report system-wide time zone information from gettimeofday has been removed, as this is not intended to be something people should rely on. Also clarify the deprecation of older SPARC ISAs, based on the fact that “SPARC version 7” is actually the very first version of the SPARC ISA (Sun Microsystems was very fond of letting the marketing department pick version numbers). Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
* Drop dependency of dist target on ChangeLogSiddhesh Poyarekar2020-01-092-1/+5
| | | | | | | | | | | | | | We no longer write manual ChangeLog entries since they are auto-generated at release time. Drop dependency of the `make dist` target on the file and document the fact that the latest ChangeLog entries can be read in the highest numbered ChangeLog.N file in ChangeLog.old. The ChangeLog.old/ChangeLog.20 file for 2.31 will thus be generated just before tagging a release. Reviewed-by: Paul Eggert <eggert@cs.ucla.edu> Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
* MIPS: Fix circular definition of __LDBL_MANT_DIG__ in ieee754.hZack Weinberg2020-01-081-1/+1
| | | | | | | | | | | | | | | In commit aa706e13f4bfdf32a27c498902edf4f6006e433e, sysdeps/mips/ieee754/ieee754.h was changed to use GCC’s predefined macro __LDBL_MANT_DIG__, instead of including <float.h> and using LDBL_MANT_DIG (and therefore polluting the user namespace with all of the macros defined in float.h). In order to support compilers that don’t provide __LDBL_MANT_DIG__, there is a fallback #if block which was supposed to include <float.h> and then define __LDBL_MANT_DIG__ to LDBL_MANT_DIG. However, at some point during the development of the patch, a typo was introduced, causing the fallback block to define __LDBL_MANT_DIG__ to expand to __LDBL_MANT_DIG__. Correct this typo.
* sl_SI locale: Use "." as the thousands separator (bug 25233)Rafał Lużyński2020-01-081-2/+2
| | | | | | | | | | This is correct according to CLDR [1] and Florian Weimer's quick research. [2] [1] https://st.unicode.org/cldr-apps/v#/sl/Symbols/ [2] https://sourceware.org/bugzilla/show_bug.cgi?id=25233#c0 Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
* Fix formatting of ChangeLog ouputSiddhesh Poyarekar2020-01-071-1/+1
| | | | | | Add another newline when the number of files differing is too large. This is typical for across-the-board changes such as the copyright year update that happened recently.
* hurd: Fix message reception for timer_threadSamuel Thibault2020-01-051-1/+2
| | | | | | | Without a proper size, we get MACH_RCV_TOO_LARGE instead of MACH_MSG_SUCCESS. * sysdeps/mach/hurd/setitimer.c (timer_thread): Add return_code_type field to received message, and set the receive size in __mach_msg call.
* htl: Add __errno_location and __h_errno_locationSamuel Thibault2020-01-045-0/+42
| | | | | | | | As explained on https://sourceware.org/ml/libc-alpha/2020-01/msg00049.html the presence of __errno_location in libpthread.so on GNU/Linux makes libpthread getting linked in for libstdc++. This aligns on that behavior, to avoid issues that only GNU/Hurd would get.
* htl: Move pthread_atfork to libc_nonshared.aSamuel Thibault2020-01-043-34/+6
| | | | | | | | | | | | | | | This follows bd60ce86520b ('nptl: Move pthread_atfork to libc_nonshared.a') with the same rationale: there is no non-libpthread equivalent to be used for making linking against libpthread optional. libpthread_nonshared.a is unused after this, so remove it from the build. There is no ABI impact because pthread_atfork was implemented using __register_atfork in libc even before this change. pthread_atfork has to be a weak alias because pthread_* names are not reserved in libc.
* htl: Drop common tcbhead_t definitionSamuel Thibault2020-01-041-10/+2
| | | | | This would conflict when including pt-internal.h outside libpthread, while we can actually just include <tls.h>
* htl: Use dso_handle.hSamuel Thibault2020-01-041-5/+2
|
* linux: Optimize fallback 32-bit clock_getresAdhemerval Zanella2020-01-031-4/+12
| | | | | | | | | | | | | | | | | | | | | | | | This patch avoid probing the __NR_clock_getttime64 syscall each time __clock_gettime64 is issued on a kernel without 64 bit time support. Once ENOSYS is obtained, only 32-bit clock_gettime are used. The following snippet: clock_getres (CLOCK_REALTIME, &(struct timespec) { 0 }); clock_getres (CLOCK_MONOTONIC, &(struct timespec) { 0 }); clock_getres (CLOCK_BOOTTIME, &(struct timespec) { 0 }); clock_getres (20, &(struct timespec) { 0 }); On a kernel without 64 bit time support issues the syscalls: syscall_0x196(0, 0xffb83330, [...]) = -1 ENOSYS (Function not implemented) clock_getres(CLOCK_REALTIME, {tv_sec=0, tv_nsec=1}) = 0 clock_getres(CLOCK_MONOTONIC, {tv_sec=0, tv_nsec=1}) = 0 clock_getres(CLOCK_BOOTTIME, {tv_sec=0, tv_nsec=1}) = 0 Checked on i686-linux-gnu on 4.15 kernel. Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
* linux: Add support for clock_getres64 vDSOAdhemerval Zanella2020-01-038-12/+24
| | | | | | | | No architecture currently defines the vDSO symbol. On archictures with 64-bit time_t the HAVE_CLOCK_GETRES_VSYSCALL is renamed to HAVE_CLOCK_GETRES64_VSYSCALL, it simplifies clock_gettime code. Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
* linux: Enable vDSO clock_gettime64 for mipsAdhemerval Zanella2020-01-031-0/+5
| | | | | | It was added on Linux 5.4 (commit 1f66c45db3302). Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
* linux: Enable vDSO clock_gettime64 for armAdhemerval Zanella2020-01-031-0/+1
| | | | | | It was added on Linux 5.5 (commit 74d06efb9c2f9). Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
* linux: Enable vDSO clock_gettime64 for i386Adhemerval Zanella2020-01-031-0/+1
| | | | | | | | It was added on Linux 5.3 (commit 22ca962288c0a). Checked on i686-linux-gnu with 5.3.0 kernel. Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
* linux: Optimize fallback 32-bit clock_gettimeAdhemerval Zanella2020-01-031-4/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch avoid probing the __NR_clock_getttime64 syscall each time __clock_gettime64 is issued on a kernel without 64 bit time support. Once ENOSYS is obtained, only 32-bit clock_gettime are used. The following snippet: clock_gettime (CLOCK_REALTIME, &(struct timespec) { 0 }); clock_gettime (CLOCK_MONOTONIC, &(struct timespec) { 0 }); clock_gettime (CLOCK_BOOTTIME, &(struct timespec) { 0 }); clock_gettime (20, &(struct timespec) { 0 }); On a kernel without 64 bit time support and with vDSO support results on the following syscalls: syscall_0x193(0, 0xff87ba30, [...]) = -1 ENOSYS (Function not implemented) clock_gettime(CLOCK_BOOTTIME, {tv_sec=927082, tv_nsec=474382032}) = 0 clock_gettime(0x14 /* CLOCK_??? */, 0xff87b9f8) = -1 EINVAL (Invalid argument) While on a kernel without vDSO support: syscall_0x193(0, 0xbec95550, 0xb6ed2000, 0x1, 0xbec95550, 0) = -1 (errno 38) clock_gettime(CLOCK_REALTIME, {tv_sec=1576615930, tv_nsec=638250162}) = 0 clock_gettime(CLOCK_MONOTONIC, {tv_sec=1665478, tv_nsec=638779620}) = 0 clock_gettime(CLOCK_BOOTTIME, {tv_sec=1675418, tv_nsec=292932704}) = 0 clock_gettime(0x14 /* CLOCK_??? */, 0xbec95530) = -1 EINVAL (Invalid argument) Checked on i686-linux-gnu on 4.15 kernel and on a 5.3 kernel. Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
* linux: Add support for clock_gettime64 vDSOAdhemerval Zanella2020-01-039-12/+34
| | | | | | | | No architecture currently defines the vDSO symbol. On architectures with 64-bit time_t the HAVE_CLOCK_GETTIME_VSYSCALL is renamed to HAVE_CLOCK_GETTIME64_VSYSCALL, it simplifies clock_gettime code. Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
* elf: Move vDSO setup to rtld (BZ#24967)Adhemerval Zanella2020-01-0331-289/+257
| | | | | | | | | | | | | | | | | | | | | | | | This patch moves the vDSO setup from libc to loader code, just after the vDSO link_map setup. For static case the initialization is moved to _dl_non_dynamic_init instead. Instead of using the mangled pointer, the vDSO data is set as attribute_relro (on _rtld_global_ro for shared or _dl_vdso_* for static). It is read-only even with partial relro. It fixes BZ#24967 now that the vDSO pointer is setup earlier than malloc interposition is called. Also, vDSO calls should not be a problem for static dlopen as indicated by BZ#20802. The vDSO pointer would be zero-initialized and the syscall will be issued instead. Checked on x86_64-linux-gnu, i686-linux-gnu, aarch64-linux-gnu, arm-linux-gnueabihf, powerpc64le-linux-gnu, powerpc64-linux-gnu, powerpc-linux-gnu, s390x-linux-gnu, sparc64-linux-gnu, and sparcv9-linux-gnu. I also run some tests on mips. Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
* elf: Enable relro for static buildAdhemerval Zanella2020-01-031-4/+14
| | | | | | | | | | | | | | | | | | | | | The code is similar to the one at elf/dl-reloc.c, where it checks for the l_relro_size from the link_map (obtained from PT_GNU_RELRO header from program headers) and calls_dl_protected_relro. For testing I will use the ones proposed by Florian's patch 'elf: Add tests for working RELRO protection' [1]. Checked on x86_64-linux-gnu, i686-linux-gnu, powerpc64le-linux-gnu, aarch64-linux-gnu, s390x-linux-gnu, and sparc64-linux-gnu. I also check with --enable-static pie on x86_64-linux-gnu, i686-linux-gnu, and aarch64-linux-gnu which seems the only architectures where static PIE is actually working (as per 9d7a3741c9e, on arm-linux-gnueabihf, powerpc64{le}-linux-gnu, and s390x-linux-gnu I am seeing runtime issues not related to my patch). [1] https://sourceware.org/ml/libc-alpha/2019-10/msg00059.html Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
* linux: Consolidate time implementationAdhemerval Zanella2020-01-033-55/+54
| | | | | | | | | | | The IFUNC bypass to vDSO is used when USE_IFUNC_TIME is set. Currently powerpc and x86 defines it. Otherwise the generic implementation is used, which calls clock_gettime. Checked on powerpc64le-linux-gnu, powerpc64-linux-gnu, powerpc-linux-gnu-power4, x86_64-linux-gnu, and i686-linux-gnu. Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
* linux: Consolidate Linux gettimeofdayAdhemerval Zanella2020-01-034-100/+63
| | | | | | | | | | | | The IFUNC bypass to vDSO is used when USE_IFUNC_GETTIMEOFDAY is set. Currently aarch64, powerpc*, and x86 defines it. Otherwise the generic implementation is used, which calls clock_gettime. Checked on aarch64-linux-gnu, powerpc64le-linux-gnu, powerpc64-linux-gnu, powerpc-linux-gnu-power4, x86_64-linux-gnu, and i686-linux-gnu. Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
* linux: Update mips vDSO symbolsAdhemerval Zanella2020-01-031-0/+1
| | | | | | | | | The clock_getres is a new implementation added on Linux 5.4 (abed3d826f2f). Checked with a build against mips-linux-gnu and mips64-linux-gnu. Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
* linux: Update x86 vDSO symbolsAdhemerval Zanella2020-01-033-4/+4
| | | | | | | | | | | | | Add the missing time and clock_getres vDSO symbol names on x86. For time, the iFUNC already uses expected name so it affects only the static build. The clock_getres is a new implementation added on Linux 5.3 (f66501dc53e72). Checked on x86-linux-gnu and i686-linux-gnu. Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
* Remove vDSO support from make-syscall.shAdhemerval Zanella2020-01-031-44/+1
| | | | | | | | | | | | | | | | | The auto-generated vDSO call shows some issues: - It requires sync the auto-generated C file with current glibc implementation; - It still uses symbol redirections hacks where libc-symbols.h provide macros that uses compiler builtins (libc_ifunc_redirected for instance); - It does not handle all required compiler handling (inhibit_stack_protector on iFUNC resolver). - No architecure uses it. Checked with a build against all major ABIs. Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
* x86: Make x32 use x86 time implementationAdhemerval Zanella2020-01-032-2/+0
| | | | | | | | | | This is the only use of auto-generation syscall which uses a vDSO plus IFUNC and the current x86 generic implementation already covers the expected semantic. Checked on x86_64-linux-gnu-x32. Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
* linux: Fix vDSO macros build with time64 interfacesAdhemerval Zanella2020-01-0310-98/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As indicated on libc-help [1] the ec138c67cb commit broke 32-bit builds when configured with --enable-kernel=5.1 or higher. The scenario 10 from [2] might also occur in this configuration and INLINE_VSYSCALL will try to use the vDSO symbol and HAVE_CLOCK_GETTIME64_VSYSCALL does not set HAVE_VSYSCALL prior its usage. Also, there is no easy way to just enable the code to use one vDSO symbol since the macro INLINE_VSYSCALL is redefined if HAVE_VSYSCALL is set. Instead of adding more pre-processor handling and making the code even more convoluted, this patch removes the requirement of defining HAVE_VSYSCALL before including sysdep-vdso.h to enable vDSO usage. The INLINE_VSYSCALL is now expected to be issued inside a HAVE_*_VSYSCALL check, since it will try to use the internal vDSO pointers. Both clock_getres and clock_gettime vDSO code for time64_t were removed since there is no vDSO setup code for the symbol (an architecture can not set HAVE_CLOCK_GETTIME64_VSYSCALL). Checked on i686-linux-gnu (default and with --enable-kernel=5.1), x86_64-linux-gnu, aarch64-linux-gnu, and powerpc64le-linux-gnu. I also checked against a build to mips64-linux-gnu and sparc64-linux-gnu. [1] https://sourceware.org/ml/libc-help/2019-12/msg00014.html [2] https://sourceware.org/ml/libc-alpha/2019-12/msg00142.html Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
* Linux: Fix clock_nanosleep time64 checkAdhemerval Zanella2020-01-031-8/+12
| | | | | | | | The result of INTERNAL_SYSCALL_CANCEL should be checked with macros INTERNAL_SYSCALL_ERROR_P and INTERNAL_SYSCALL_ERRNO instead of comparing the result directly. Checked on powerpc-linux-gnu.
* Add libm_alias_finite for _finite symbolsWilco Dijkstra2020-01-03263-351/+605
| | | | | | | | | | | | | | | | | | | This patch adds a new macro, libm_alias_finite, to define all _finite symbol. It sets all _finite symbol as compat symbol based on its first version (obtained from the definition at built generated first-versions.h). The <fn>f128_finite symbols were introduced in GLIBC 2.26 and so need special treatment in code that is shared between long double and float128. It is done by adding a list, similar to internal symbol redifinition, on sysdeps/ieee754/float128/float128_private.h. Alpha also needs some tricky changes to ensure we still emit 2 compat symbols for sqrt(f). Passes buildmanyglibc. Co-authored-by: Adhemerval Zanella <adhemerval.zanella@linaro.org> Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
* Update libc.pot for 2.31 releaseSiddhesh Poyarekar2020-01-021-70/+66
|
* Multiple locales: Add date_fmt (bug 24054)Rafał Lużyński2020-01-02204-203/+564
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It is not specified what should be the content of d_t_fmt and date_fmt but in the built-in C locale those fields have only one difference: date_fmt contains "%Z" (the current time zone) while d_t_fmt does not. For most of the locales this commit does the following operation: copy d_t_fmt to date_fmt, and then remove "%Z" from d_t_fmt. If "%Z" was originally missing from d_t_fmt add it to date_fmt. It also corrects comments where necessary. Exceptions: * In bo_CN, dz_BT, and km_KH "%Z" has not been added to date_fmt because it was too difficult. In these locales date_fmt has been set to the copy of d_t_fmt. * In en_DK "%Z" has not been removed from d_t_fmt in order to preserve the conformance with the standard mentioned in the comment. The command to identify and initially edit the locales that need the update was: for i in `grep -lw d_t_fmt *` do if ! grep -qw date_fmt $i ; then awk '/d_t_fmt/ { print $0; gsub("d_t_fmt", "date_fmt"); } //{ print $0 }' < $i > $i.next mv $i.next $i fi done and then each file was further edited manually.
* build-many-glibcs.py: Fix “glibcs i686-gnu --strip”Florian Weimer2020-01-021-4/+9
| | | | | | Hurd uses an empty prefix, so the linker scripts end up in /lib, the find command picked them up, and stripping them failed because they are not ELF files.
* Linux: Remove pread/pread64, pwrite/pwrite64 kludges from <sysdep.h>Florian Weimer2020-01-024-40/+0
| | | | | | Since the switch away from auto-generated wrappers for these system calls, the kludge is already included in the C source file of the system call wrapper.
* build-many-glibcs.py: Implement update-syscalls commandFlorian Weimer2020-01-021-3/+62
| | | | | | | | | This command uses pre-built compilers to re-install the Linux headers from the current sources into a temporary location and runs glibc's “make update-syscalls-lists” against that. This updates the glibc source tree with the current system call numbers. Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
* build-many-glibcs.py: Introduce glibc build policy classesFlorian Weimer2020-01-021-49/+80
| | | | | | | | The new classes GlibcPolicyForCompiler and GlibcPolicyForBuild allow customization of the Glibc.build_glibc method, replacing the existing for_compiler flag. Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>