about summary refs log tree commit diff
Commit message (Collapse)AuthorAgeFilesLines
* y2038: Use a common definition for statLukasz Majewski2021-06-1510-243/+320
| | | | | | | | | | | | | Instead of replicate the same definitions from struct_stat_time64.h on the multiple struct_stat.h, use a common header which is included when required (struct_stat_time64_helper.h). The 64-bit time support is added only for LFS support. The __USE_TIME_BITS64 is not defined internally yet, although the internal header is used when building the 64-bit stat implementations. Reviewed-by: Carlos O'Donell <carlos@redhat.com> Tested-by: Carlos O'Donell <carlos@redhat.com>
* y2038: linux: Add __USE_TIME_BITS64 support for struct timexAdhemerval Zanella2021-06-151-0/+31
| | | | | | | | The __USE_TIME_BITS64 is not defined internally yet. Reviewed-by: Lukasz Majewski <lukma@denx.de> Reviewed-by: Carlos O'Donell <carlos@redhat.com> Tested-by: Carlos O'Donell <carlos@redhat.com>
* y2038: Add __USE_TIME_BITS64 support for struct utimbufAdhemerval Zanella2021-06-151-0/+5
| | | | | | | | The __USE_TIME_BITS64 is not defined internally yet. Reviewed-by: Lukasz Majewski <lukma@denx.de> Reviewed-by: Carlos O'Donell <carlos@redhat.com> Tested-by: Carlos O'Donell <carlos@redhat.com>
* y2038: Add __USE_TIME_BITS64 support for struct timespecAdhemerval Zanella2021-06-151-1/+6
| | | | | | | | The __USE_TIME_BITS64 is not defined internally yet. Reviewed-by: Lukasz Majewski <lukma@denx.de> Reviewed-by: Carlos O'Donell <carlos@redhat.com> Tested-by: Carlos O'Donell <carlos@redhat.com>
* y2038: Add __USE_TIME_BITS64 support for struct timevalAdhemerval Zanella2021-06-151-0/+5
| | | | | | | | The __USE_TIME_BITS64 is not defined internally yet. Reviewed-by: Lukasz Majewski <lukma@denx.de> Reviewed-by: Carlos O'Donell <carlos@redhat.com> Tested-by: Carlos O'Donell <carlos@redhat.com>
* y2038: Add __USE_TIME_BITS64 support for time_tAdhemerval Zanella2021-06-151-0/+4
| | | | | | | | The __USE_TIME_BITS64 is not defined internally yet. Reviewed-by: Lukasz Majewski <lukma@denx.de> Reviewed-by: Carlos O'Donell <carlos@redhat.com> Tested-by: Carlos O'Donell <carlos@redhat.com>
* linux: Add recvvmsg fallback for 64-bit time_t SO_TIMESTAMP{NS}Adhemerval Zanella2021-06-151-2/+15
| | | | | | | | | | | | | | | | | | | | | | Handle the SO_TIMESTAMP{NS} similar to recvmsg: for !__ASSUME_TIME64_SYSCALLS it converts the first 32-bit time SO_TIMESTAMP or SO_TIMESTAMPNS and appends it to the control buffer if has extra space or returns MSG_CTRUNC otherwise. The 32-bit time field is kept as-is. Also for !__ASSUME_TIME64_SYSCALLS it limits the maximum number of 'struct mmsghdr *' to IOV_MAX (and also increases the stack size requirement to IOV_MAX times sizeof (socklen_t)). The Linux imposes a similar limit to sendmmsg, so bound the array size on recvmmsg is not unreasonable. And this will be used only on older when building with 32-bit time support. Checked on x86_64-linux-gnu and i686-linux-gnu (on 5.4 and on 4.15 kernel). Reviewed-by: Lukasz Majewski <lukma@denx.de> Reviewed-by: Carlos O'Donell <carlos@redhat.com> Tested-by: Carlos O'Donell <carlos@redhat.com>
* linux: Add fallback for 64-bit time_t SO_TIMESTAMP{NS}Adhemerval Zanella2021-06-1511-7/+167
| | | | | | | | | | | | | | | | | | | | | | The recvmsg handling is more complicated because it requires check the returned kernel control message and make some convertions. For !__ASSUME_TIME64_SYSCALLS it converts the first 32-bit time SO_TIMESTAMP or SO_TIMESTAMPNS and appends it to the control buffer if has extra space or returns MSG_CTRUNC otherwise. The 32-bit time field is kept as-is. Calls with __TIMESIZE=32 will see the converted 64-bit time control messages as spurious control message of unknown type. Calls with __TIMESIZE=64 running on pre-time64 kernels will see the original message as a spurious control ones of unknown typ while running on kernel with native 64-bit time support will only see the time64 version of the control message. Checked on x86_64-linux-gnu and i686-linux-gnu (on 5.4 and on 4.15 kernel). Reviewed-by: Carlos O'Donell <carlos@redhat.com> Tested-by: Carlos O'Donell <carlos@redhat.com>
* linux: Add fallback for 64-bit time_t SO_{RCV,SND}TIMEOAdhemerval Zanella2021-06-147-15/+276
| | | | | | | | | | | | | | | | | | | The constant values will be changed for __TIMESIZE=64, so binaries built with 64-bit time support might fail to work properly on old kernels. Both {get,set}sockopt will retry the syscall with the old constant values and the timeout value adjusted when kernel returns ENOTPROTOPT. It also adds an internal only SO_{RCV,SND}TIMEO where COMPAT_SO_{RCV,SND}TIMEO_OLD indicates pre 32-bit time support and COMPAT_SO_{RCV,SND}TIMEO_NEW indicates time64 support. It allows to refer to constant independently of the time_t ABI and kernel version used. Checked on x86_64-linux-gnu and i686-linux-gnu (on 5.4 and on 4.15 kernel). Reviewed-by: Carlos O'Donell <carlos@redhat.com> Tested-by: Carlos O'Donell <carlos@redhat.com>
* linux: s390: Add libanl.abilist in s390 and s390xAdhemerval Zanella2021-06-142-0/+4
| | | | | | | | The s390 will require the 64-bit time symbols for y2038 support. Reviewed-by: Lukasz Majewski <lukma@denx.de> Reviewed-by: Carlos O'Donell <carlos@redhat.com> Tested-by: Carlos O'Donell <carlos@redhat.com>
* linux: mips: Split libanl.abilist in n32 and n64Adhemerval Zanella2021-06-142-0/+4
| | | | | | | | The n32 will require the 64-bit time symbols for y2038 support. Reviewed-by: Lukasz Majewski <lukma@denx.de> Reviewed-by: Carlos O'Donell <carlos@redhat.com> Tested-by: Carlos O'Donell <carlos@redhat.com>
* linux: mips: Split librt.abilist in n32 and n64Adhemerval Zanella2021-06-142-0/+37
| | | | | | | | The n32 will require the 64-bit time symbols for y2038 support. Reviewed-by: Lukasz Majewski <lukma@denx.de> Reviewed-by: Carlos O'Donell <carlos@redhat.com> Tested-by: Carlos O'Donell <carlos@redhat.com>
* Reinstate gconv-modules as the default configuration fileSiddhesh Poyarekar2021-06-143-21/+23
| | | | | | | | Reinstate gconv-modules as the main file so that the configuration files in gconv-modules.d/ become add-on configuration. With this, the effective user visible change is that GCONV_PATH can now have supplementary configuration in GCONV_PATH/gconv-modules.d/ in addition to the main GCONV_PATH/gconv-modules file.
* Add build option to disable usage of scv on powerpcMatheus Castanho2021-06-1010-13/+59
| | | | | | | | | | | | | | | | | Commit 68ab82f56690ada86ac1e0c46bad06ba189a10ef added support for the scv syscall ABI on powerpc. Since then systems that have kernel and processor support started using scv. However adding the proper support for a new syscall ABI requires changes to several other projects (e.g. qemu, valgrind, strace, kernel), which are gradually receiving support. Meanwhile, having a way to disable scv on glibc at build time can be useful for distros that may encounter conflicts with projects that still do not support the scv ABI, buying time until proper support is added. This commit adds a --disable-scv option that disables scv support and uses sc for all syscalls, like before commit 68ab82f56690ada86ac1e0c46bad06ba189a10ef. Reviewed-by: Raphael M Zinsly <rzinsly@linux.ibm.com>
* io: Fix sporadic test failures in io/tst-statFlorian Weimer2021-06-102-5/+6
| | | | | | | | support_stat_nanoseconds cannot restore the ctime time, and this may lead to sporadic test failures. Therefore, probe for nanoseconds support before the initial statx call. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* nptl: Avoid async cancellation to wrongly update __nptl_nthreads (BZ #19366)Adhemerval Zanella2021-06-091-7/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The testcase provided on BZ#19366 may update __nptl_nthreads in a wrong order, triggering an early process exit because the thread decrement the value twice. The issue is once the thread exits without acting on cancellation, it decreaments '__nptl_nthreads' and then atomically set 'cancelhandling' with EXITING_BIT (thus preventing further cancellation handler to act). The issue happens if a SIGCANCEL is received between checking '__ntpl_nthreads' and setting EXITING_BIT. To avoid it, the '__nptl_nthreads' decrement is moved after EXITING_BIT. It does fully follow the POSIX XSH 2.9.5 Thread Cancellation under the heading Thread Cancellation Cleanup Handlers that states that when a cancellation request is acted upon, or when a thread calls pthread_exit(), the thread first disables cancellation by setting its cancelability state to PTHREAD_CANCEL_DISABLE and its cancelability type to PTHREAD_CANCEL_DEFERRED. The issue is '__pthread_enable_asynccancel' explicit enabled assynchrnous cancellation, so an interrupted syscall within the cancellation cleanup handlers might see an invalid cancelling type (a possible fix might be possible with my proposed solution to BZ#12683). Trying to come up with a test is quite hard since it requires to mimic the timing issue described below, however I see that the bug report reproducer does not early exit anymore. Checked on x86_64-linux-gnu.
* nptl: Use pthread_kill on pthread_cancelAdhemerval Zanella2021-06-093-11/+15
| | | | | | | | | | It consolidates the tgkill call and it is the first step of making pthread_cancel async-signal-safe. It also fix a possible issue where the 'struct pthread' tid is not read atomically, which might send an invalid cancellation signal (similar to what db988e50a87f613cb6b9e98a2fc66a4848bc3546 fixed for pthread_join). Checked on x86_64-linux-gnu and aarch64-linux-gnu.
* nptl: Implement raise in terms of pthread_killAdhemerval Zanella2021-06-098-71/+50
| | | | | | | | | | | | | | | | Now that pthread_kill is provided by libc.so it is possible to implement the generic POSIX implementation as 'pthread_kill(pthread_self(), sig)'. For Linux implementation, pthread_kill read the targeting TID from the TCB. For raise, this it not possible because it would make raise fail when issue after vfork (where creates the resulting process has a different TID from the parent, but its TCB is not updated as for pthread_create). To make raise use pthread_kill, it is make usable from vfork by getting the target thread id through gettid syscall. Checked on x86_64-linux-gnu and aarch64-linux-gnu.
* nptl: Move cancel type out of cancelhandlingAdhemerval Zanella2021-06-098-170/+35
| | | | | | | | | | | | | | Now that the thread cancellation type is not accessed concurrently anymore, it is possible to move it out the cancelhandling. By removing the cancel state out of the internal thread cancel handling state there is no need to check if cancelled bit was set in CAS operation. It allows simplifing the cancellation wrappers and the CANCEL_CANCELED_AND_ASYNCHRONOUS is removed. Checked on x86_64-linux-gnu and aarch64-linux-gnu.
* nptl: Move cancel state out of cancelhandlingAdhemerval Zanella2021-06-0914-63/+34
| | | | | | | | | | | | | | | Now that thread cancellation state is not accessed concurrently anymore, it is possible to move it out the 'cancelhandling'. The code is also simplified: CANCELLATION_P is replaced with a internal pthread_testcancel call and the CANCELSTATE_BIT{MASK} is removed. With this behavior pthread_setcancelstate does not require to act on cancellation if cancel type is asynchronous (is already handled either by pthread_setcanceltype or by the signal handler). Checked on x86_64-linux-gnu and aarch64-linux-gnu.
* nptl: Remove CANCELING_BITMASKAdhemerval Zanella2021-06-094-106/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | The CANCELING_BITMASK is used as an optimization to avoid sending the signal when pthread_cancel is called in a concurrent manner. This requires then to put both the cancellation state and type on a shared state (cancelhandling), since 'pthread_cancel' checks whether cancellation is enabled and asynchrnous to either cancel itself of sending the signal. It also requires handle the CANCELING_BITMASK on __pthread_disable_asynccancel, however this incurs in the same issues described on BZ#12683: the cancellation is acted upon even *after* syscall returns with user visible side-effects. This patch removes this optimization and simplifies the pthread cancellation implementation: pthread_cancel now first checks if cancellation is already pending and if not always, sends a signal if the target is not itself. The SIGCANCEL handler is also simpified since there is not need to setup a CAS loop. It also allows to move both the cancellation state and mode out of 'cancelhadling' (it is done in subsequent patches). Checked on x86_64-linux-gnu and aarch64-linux-gnu.
* nptl: Install cancellation handler on pthread_cancelAdhemerval Zanella2021-06-094-45/+28
| | | | | | | | Now that cancellation is not used anymore to handle thread setup creation failure, the sighandle can be installed only when pthread_cancel is actually used. Checked on x86_64-linux-gnu and aarch64-linux-gnu.
* nptl: Deallocate the thread stack on setup failure (BZ #19511)Adhemerval Zanella2021-06-093-88/+80
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To setup either the thread scheduling parameters or affinity, pthread_create enforce synchronization on created thread to wait until its parent either release PD ownership or send a cancellation signal if a failure occurs. However, cancelling the thread does not deallocate the newly created stack since cancellation expects that a pthread_join to deallocate any allocated thread resouces (threads stack or TLS). This patch changes on how the thread resource is deallocate in case of failure to be synchronous, where the creating thread will signal the created thread to exit early so it could be joined. The creating thread will be reponsible for the resource cleanup before returning to the caller. To signal the creating thread that a failure has occured, an unused 'struct pthread' member, parent_cancelhandling_unsed, now indicates whether the setup has failed so creating thread can proper exit. This strategy also simplifies by not using thread cancellation and thus not running libgcc_so load in the signal handler (which is avoided in thread cancellation since 'pthread_cancel' is the one responsible to dlopen libgcc_s). Another advantage is since the early exit is move to first step at thread creation, the signal mask is not already set and thus it can not act on change ID setxid handler. Checked on x86_64-linux-gnu and aarch64-linux-gnu.
* Remove stale references to libdl.aFlorian Weimer2021-06-093-8/+1
| | | | | | | | Since commit 0c1c3a771eceec46e66ce1183cf988e2303bd373 ("dlfcn: Move dlopen into libc") libdl.a is empty, so linking against it is no longer necessary. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* Fix elf/tst-tls9-static after libdl cleanups.Stefan Liebler2021-06-091-2/+0
| | | | | | | | | | | | The testcase elf/tst-tls9-static sometimes fails with: cannot open 'tst-tlsmod5.so': tst-tlsmod5.so: cannot open shared object file: No such file or directory cannot open 'tst-tlsmod6.so': tst-tlsmod6.so: cannot open shared object file: No such file or directory After recent commit 6f1c701026287f6928d3bdd1aea7359308635abe "dlfcn: Cleanups after -ldl is no longer required" the libdl variable is not set anymore and thus the dependencies were missing.
* iconvdata: Split out non-essential gconv module configurationSiddhesh Poyarekar2021-06-093-1858/+1890
| | | | | | | | | Split module configuration so that only the bare minimum charsets, i.e. ANSI_X3.110, ISO8859-15, ISO8859-1, CP1252, UNICODE, UTF-16, UTF-32 and UTF-7 are configured in gconv-modules.conf. The remaining module configurations are now in gconv-modules-extra.conf. Reviewed-by: DJ Delorie <dj@redhat.com>
* iconvdata: Move gconv-modules configuration to gconv-modules.confSiddhesh Poyarekar2021-06-095-22/+44
| | | | | | | | | | | Move all gconv-modules configuration files to gconv-modules.conf. That is, the S390 extensions now become gconv-modules-s390.conf. Move both configuration files into gconv-modules.d. Now GCONV_PATH/gconv-modules is read only for backward compatibility for third-party gconv modules directories. Reviewed-by: DJ Delorie <dj@redhat.com>
* gconv_conf: Read configuration files in gconv-modules.dSiddhesh Poyarekar2021-06-091-6/+43
| | | | | | | | Read configuration files with names ending in .conf in GCONV_PATH/gconv-modules.d to mirror configuration flexibility in iconvconfig into the iconv program and function. Reviewed-by: DJ Delorie <dj@redhat.com>
* iconvconfig: Read configuration from gconv-modules.d subdirectorySiddhesh Poyarekar2021-06-091-6/+44
| | | | | | | | | | | | | | | In addition to GCONV_PATH/gconv-modules, also read module configuration from *.conf files in GCONV_PATH/gconv-modules.d. This allows a single gconv directory to have multiple sets of gconv modules but at the same time, a single modules cache. With this feature, one could separate the glibc supported gconv modules into a minimal essential set (ISO-8859-*, UTF, etc.) from the remaining modules. In future, these could be further segregated into langpack-associated sets with their own gconv-modules.d/someconfig.conf. Reviewed-by: DJ Delorie <dj@redhat.com>
* iconvconfig: Make file handling more general purposeSiddhesh Poyarekar2021-06-091-25/+40
| | | | | | | | Split out configuration file handling code from handle_dir into its own function so that it can be reused for multiple configuration files. Reviewed-by: DJ Delorie <dj@redhat.com>
* AArch64: Add support for roundeven[f]Wilco Dijkstra2021-06-082-0/+57
| | | | | | Add inline assembler for the roundeven functions. Passes GLIBC regression. Note GCC does not inline the builtin (PR100966), so this cannot be used for now.
* configure: Replaced obsolete AC_TRY_COMPILENaohiro Tamura2021-06-0413-81/+88
| | | | | | | | | | | | | | | | | This patch replaced obsolete AC_TRY_COMPILE to AC_COMPILE_IFELSE or AC_PREPROC_IFELSE. It has been confirmed that GNU 'autoconf' 2.69 suppressed obsolete warnings, updated the following files: - configure - sysdeps/mach/configure - sysdeps/mach/hurd/configure - sysdeps/s390/configure - sysdeps/unix/sysv/linux/configure and didn't change the following files: - sysdeps/ieee754/ldbl-opt/configure - sysdeps/unix/sysv/linux/powerpc/configure Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* libio: Assume _IO_lock_inexpensiveAdhemerval Zanella2021-06-043-15/+2
| | | | It is already set by both Linux and Hurd.
* nptl: Remove exit-thread.hAdhemerval Zanella2021-06-045-69/+4
| | | | | No function change. The code is used only for Linux, besides being included in generic code.
* Improve test coverage of strnlen functionSunil K Pandey2021-06-031-1/+10
| | | | | | | | | This patch covers the following condition: Strings start with different alignments and end with length less than or equal to 512 byte. Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
* dlfcn: Rework static dlopen hooksFlorian Weimer2021-06-0315-139/+54
| | | | | | | | | | | | | | Consolidate all hooks structures into a single one. There are no static dlopen ABI concerns because glibc 2.34 already comes with substantial ABI-incompatible changes in this area. (Static dlopen requires the exact same dynamic glibc version that was used for static linking.) The new approach uses a pointer to the hooks structure into _rtld_global_ro and initalizes it in __rtld_static_init. This avoids a back-and-forth with various callback functions. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* dlfcn: Eliminate GLIBC_PRIVATE dependency from tststatic2Florian Weimer2021-06-032-2/+18
| | | | | | | | | The test appears to use _dlfcn_hook@@GLIBC_PRIVATE as a way to test dlvsym without having to know the appropriate symbol version. With <first-versions.h>, we can use a public symbol and the symbol version at which it was defined first. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* dlfcn: Cleanups after -ldl is no longer requiredFlorian Weimer2021-06-0317-270/+60
| | | | | | | | | | | | This commit removes the ELF constructor and internal variables from dlfcn/dlfcn.c. The file now serves the same purpose as nptl/libpthread-compat.c, so it is renamed to dlfcn/libdl-compat.c. The use of libdl-shared-only-routines ensures that libdl.a is empty. This commit adjusts the test suite not to use $(libdl). The libdl.so symbolic link is no longer installed. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* dlfcn: Move dlopen into libcFlorian Weimer2021-06-0370-96/+193
| | | | | | The symbol was moved using scripts/move-symbol-to-libc.py. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* dlfcn: Move dlvsym into libcFlorian Weimer2021-06-0369-65/+115
| | | | | | The symbol was moved using scripts/move-symbol-to-libc.py. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* dlfcn: Move dlinfo into libcFlorian Weimer2021-06-0369-54/+120
| | | | | | The symbol was moved using scripts/move-symbol-to-libc.py. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* dlfcn: Move dladdr1 into libcFlorian Weimer2021-06-0368-50/+81
| | | | | | The symbol was moved using scripts/move-symbol-to-libc.py. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* dlfcn: Move dlmopen into libcFlorian Weimer2021-06-0369-73/+154
| | | | | | The symbol was moved using scripts/move-symbol-to-libc.py. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* dlfcn: Move dlsym into libcFlorian Weimer2021-06-0370-60/+108
| | | | | | | | | | 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>
* dlfcn: Move dladdr into libcFlorian Weimer2021-06-0368-50/+78
| | | | | | The symbol was moved using scripts/move-symbol-to-libc.py. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* dlfcn: Move dlclose into libcFlorian Weimer2021-06-0368-57/+83
| | | | | | The symbol was moved using scripts/move-symbol-to-libc.py. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* Improve test coverage of strlen functionSunil K Pandey2021-06-021-1/+14
| | | | | | | | | | | This patch covers the following conditions: - Strings start with different alignments and end at the page boundary with less than 64 byte length. - Strings starts with different alignments and cross page boundary with fixed length. Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
* fix typoXeonacid2021-06-022-2/+2
| | | | | "accomodate" should be "accommodate" Reviewed-by: Paul Zimmermann <Paul.Zimmermann@inria.fr>
* dlfcn: Move dlerror into libcFlorian Weimer2021-06-0268-66/+104
| | | | | | | | | | | | | | 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>
* Add libc ABI extension kludge for baseline-violating libdl symbolsFlorian Weimer2021-06-025-1/+29
| | | | | | | | | | | | | | | | | | | 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>