Glibc 2.36 System Library Release

After six months of development, the release of the GNU C Library (glibc) 2.36 is published, which fully complies with the requirements of the ISO C11 and POSIX.1-2017 standards. The new release includes fixes from 59 developers.

Among the improvements implemented in Glibc 2.36 are:

  • Added support for a new format of relative relocation addresses DT_RELR (relative relocation), which allows to reduce the size of relative relocations in shared objects and executable files linked in PIE (Position-independent executables) mode. Using the DT_RELR field in ELF files requires support for the "-z pack-relative-relocs" option in the linker, introduced in the binutils 2.38 release.
  • The pidfd_open, pidfd_getfd, and pidfd_send_signal functions have been implemented for the Linux platform to provide access to pidfd functionality that helps handle PID reuse situations to better identify processes accessing monitored files (pidfd is associated with a specific process and does not change, while a PID can be associated with another process after the current process associated with that PID terminates).
  • The process_madvise() function has been added for the Linux platform, which allows one process to execute a madvise() system call on behalf of another process, identifying the target process using pidfd. Through madvise(), you can inform the kernel about the features of working with memory to optimize process memory management, for example, based on the information passed, the kernel can initiate the release of additional free memory. Calling madvise() by another process may be required in a situation where the information necessary for optimization is unknown to the current process, but is coordinated by a separate background control process, which itself can initiate the removal of unused memory from processes.
  • For the Linux platform, the process_mrelease() function has been added, which allows you to speed up the release of memory for a process that terminates its execution. Under normal circumstances, resource release and process termination are not instantaneous and can be delayed for various reasons, which interferes with user-space early warning systems such as oomd (provided by systemd). By calling process_mrelease , such systems can more predictably initiate memory reclaims from forcibly terminated processes.
  • Support for the β€œno-aaaa” option has been added to the built-in implementation of the DNS resolver, which allows to disable sending DNS queries for AAAA records (determining an IPv6 address by host name), including when executing NSS functions like getaddrinfo(), to simplify troubleshooting. This option does not affect the handling of IPv6 address bindings defined in /etc/hosts and calls to getaddrinfo() with the AI_PASSIVE flag.
  • For the Linux platform, the fsopen, fsmount, move_mount, fsconfig, fspick, open_tree, and mount_setattr functions have been added to provide access to a new kernel API for controlling how filesystems are mounted based on mount namespaces. The proposed functions allow you to separately process different stages of mounting (process the superblock, get information about the file system, mount, attach to the mount point), which were previously performed using the common mount() function. Separate functions allow you to perform more complex mount scripts and separately perform operations such as reconfiguring the superblock, enabling options, changing the mount point, and moving to a different namespace. In addition, separate processing allows you to accurately determine the reasons for the output of error codes and specify multiple sources for layered file systems, such as overlayfs.
  • localedef has support for handling files with locale definitions shipped in UTF-8 instead of ASCII.
  • Added functions for converting mbrtoc8 and c8rtomb multibyte encodings that conform to ISO C2X N2653 and C++20 P0482R6 specifications.
  • Added support for the char8_t type defined in the draft ISO C2X N2653 standard.
  • Added arc4random, arc4random_buf, and arc4random_uniform functions to provide bindings over the getrandom system call and the /dev/urandom interface, returning high quality pseudo-random numbers.
  • When running on the Linux platform, support is provided for the LoongArch instruction set architecture used in the Loongson 3 5000 processors and implementing a new RISC ISA similar to MIPS and RISC-V. In its current form, only support for the 64-bit variant of LoongArch (LA64) is available. Requires at least binutils 2.38, GCC 12 and Linux kernel 5.19 to work.
  • Deprecated and will be removed in a future release, the prelink mechanism, as well as the associated LD_TRACE_PRELINKING and LD_USE_LOAD_BIAS environment variables and linker features.
  • Removed code for checking the Linux kernel version and handling the LD_ASSUME_KERNEL environment variable. The minimum kernel version supported when building Glibc is determined by the ELF field NT_GNU_ABI_TAG.
  • The LD_LIBRARY_VERSION environment variable has been deprecated on the Linux platform.

Source: opennet.ru

Add a comment