Glibc 2.36 arrives with new features for Linux, improvements and more

After six months of development, the release of the new version of glibc 2.36 was announced, which fully complies with the requirements of the ISO C11 and POSIX.1-2017 standards and in which the new version includes corrections from 59 developers. .

For those who are unfamiliar with Glibc, they should know what it is a GNU C library, commonly known as glibc is the standard GNU C runtime library. On systems where it is used, this C library that provides and defines system calls and other basic functions, it is used by almost all programs. 

Main new features of Glibc 2.36

In this new version that is presented, it is highlighted that added support for a new relative relocation address format DT_RELR, which allows you to reduce the size of relative relocations in shared objects and linked executables in PIE (Position Independent Executables) mode. Use of the DT_RELR field in ELF files requires support for the "-z pack-relative-relocs" option in the linker, introduced in binutils 2.38.

Another change that stands out in the new version is that for Linux the functions pidfd_open, pidfd_getfd, and pidfd_send_signal were implemented to provide access to the pidfd functionality which helps to handle PID reuse situations to more accurately identify the processes accessing the monitored files (pidfd is associated with a specific process and does not change, while the PID can be attached to another process after the process ends). current process associated with this PID).

Besides that, also in Linux comes process_madvise(), who allows a 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 characteristics of working with memory to optimize the memory management of the process, for example, based on the passed information, the kernel can start releasing additional free memory.

It is also noted that the function was added process_mrelease(), which allows you to speed up the release of memory for a process that ends its execution. Under normal circumstances, resource release and process termination are not instantaneous and can be delayed for various reasons, interfering with user space early warning systems such as oomd (provided by systemd). By calling process_mrelease, these systems can more predictably start memory retrievals for processes that were forcibly terminated.

On the other hand, it is noted that it has been added support for "no-aaaa" option to the integrated implementation of DNS resolution, which allows you to disable sending DNS requests for AAAA records (determining an IPv6 address by hostname), even when running 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 Linux, added the functions fsopen, fsmount, move_mount, fsconfig, fspick, open_tree, and mount_setattr for provide access to a new kernel API to control how file systems are mounted based on mount namespaces. The proposed functions allow separate processing of different mounting steps (processing the superblock, getting information about the file system, mounting, attaching to the mount point), which were previously performed using the common mount() function.

Were added the functions arc4random, arc4random_buf and arc4random_uniform to provide bindings on the system call getrandom and the interface / dev / urandom, returning high-quality pseudo-random numbers.

When running on Linux, support for the architecture is provided. from the instruction set LoongArch used in Loongson 3 5000 processors and a new RISC ISA similar to MIPS and RISC-V is implemented. In its current form, only compatibility is available with 64-bit variant from LoongArch (LA64). It requires at least binutils 2.38, GCC 12, and Linux kernel 5.19 to run.

Of the other changes that stand out:

  • The prelinking mechanism, as well as the associated LD_TRACE_PRELINKING and LD_USE_LOAD_BIAS environment variables and linker features, are deprecated and will be removed in a future release.
  • Removed code to check the Linux kernel version and handle the LD_ASSUME_KERNEL environment variable. The minimum kernel version supported when compiling Glibc is determined by the ELF field NT_GNU_ABI_TAG.
  • The LD_LIBRARY_VERSION environment variable has been deprecated on the Linux platform.

Finally, if you are interested in knowing more about it, you can consult the details In the following link.


Leave a Comment

Your email address will not be published. Required fields are marked with *

*

*

  1. Responsible for the data: Miguel Ángel Gatón
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.