Generated by GPT-5-mini| glibc | |
|---|---|
| Name | glibc |
| Developer | GNU Project |
| Operating system | Unix-like |
| Genre | C library |
| License | LGPL |
glibc The GNU C Library (commonly known as glibc) is the core implementation of the C standard library for many Linux-based systems and other Unix-like operating systems. It provides essential runtime support for Linux kernel-based distributions, enabling system utilities, application frameworks, and language runtimes to interoperate with hardware and kernel services. glibc underpins software stacks used by projects such as GNU Project, Debian, Red Hat Enterprise Linux, Ubuntu, and Android toolchains.
glibc implements the C standard library interfaces specified by standards such as C99 and C11, POSIX standards like POSIX.1-2001, and extensions used by ecosystems including X Window System, systemd, glib, and Qt. It supplies libc functions for I/O, string handling, memory management, threading via POSIX Threads, networking via Berkeley sockets, localization via POSIX locale, and dynamic linking through the runtime linker used by GNU Compiler Collection toolchains and ld.so. glibc is maintained within the GNU Project and interacts closely with projects like GCC and Binutils.
glibc originated to provide a GNU implementation of the C standard library for GNU Project systems and to interoperate with the Linux kernel after the creation of Linux by Linus Torvalds. Early development involved contributors from projects such as Red Hat and Cygnus Solutions, with stewardship by maintainers affiliated with Free Software Foundation goals. Over successive releases glibc added support for standards from POSIX, integrated with virtual memory and threading models influenced by Linux kernel APIs, and adopted performance and security features driven by ecosystem needs from distributions including Debian, Fedora, and SUSE. Notable development events intersect with projects like systemd integration debates and compatibility efforts with musl-using distributions.
glibc's architecture comprises modular components: the libc API, resolver and name service switch integrating nsswitch backends for services such as DNS, LDAP, and NIS, the dynamic linker/loader implementing ELF semantics, and the thread library implementing POSIX Threads semantics via the NPTL threading model. Other components include the math library implementing IEEE 754 semantics, locale and internationalization modules interoperating with UTF-8 and Unicode data from projects like ICU, and optimized low-level routines used by compilers like GCC and Clang. The build system orchestrates integration with Autotools, Make, and cross-compilation toolchains targeting architectures such as x86-64, ARM, PowerPC, and RISC-V.
glibc implements standardized APIs from C99 and POSIX.1-2008 and provides extensions for compatibility with historical interfaces from projects like BSD and System V. It provides advanced features including std::printf family compliance for formatted I/O, wide-character and multibyte support for Unicode locales, and thread-safe reentrant functions used by applications developed for Apache HTTP Server, MySQL, and OpenSSL. glibc's dynamic linker supports symbol versioning and resolution semantics relied upon by GNU Coreutils, X.Org Server, and Wayland-based compositors. Compatibility interfaces permit integration with language runtimes such as Python, Ruby, and Java Virtual Machine implementations.
Major distributions package glibc releases with backports and distribution-specific patches; examples include Debian, Ubuntu, Red Hat Enterprise Linux, CentOS, Fedora, SUSE Linux Enterprise Server, and Arch Linux. Distributors coordinate ABI stability timelines to support ecosystems such as GNOME, KDE, LibreOffice, PostgreSQL, and Docker. Cross-distribution compatibility concerns have driven compatibility layers like glibc's static linking practices, container runtimes such as Docker and podman, and alternative libc projects like musl and uClibc.
glibc has been both optimized for performance with architecture-specific assembly routines and scrutinized for security vulnerabilities disclosed via channels used by CERT Coordination Center, US-CERT, and vendor advisories from Red Hat and Debian Security. Past vulnerabilities prompted coordinated responses involving maintainers, distribution security teams, and projects such as OpenSSL, GnuTLS, and systemd to mitigate exploitation risks. Debugging and profiling integrate with tools like gdb, perf, and Valgrind. Bug management is tracked through mailing lists and issue trackers commonly used by GNU Project contributors and stakeholders from Canonical and enterprise vendors.
glibc is released under the GNU Lesser General Public License (LGPL) with additional exceptions that permit static linking in certain contexts, affecting compliance policies for downstream projects such as Proprietary software vendors and embedded systems suppliers. Licensing considerations have influenced adoption decisions by companies including Google, IBM, and Intel when distributing Linux-based products. The licensing model aligns with Free Software Foundation principles while allowing interoperability with commercial distributions and contributor agreements used by organizations like SUSE and Red Hat.
Category:C libraries