How lattera/glibc works
GNU C Library (glibc) is the system API and runtime used by C-compatible applications to access common language, POSIX, and operating-system facilities. A representative lookup workflow is an application requesting a service record, NSS dispatching the request to configured sources, and a backend returning a parsed result; DNS query construction and resolution are a related but distinct network capability. The tree also shows major runtime areas such as startup, dynamic loading, threads, I/O, character conversion, and cryptography. Resolver and service-backend links reflect the sampled excerpts; other subsystem connections are not inferred.
Main entry points: service-lookup.c NSS dispatch · res_query.c DNS resolver · libc-start.c Process startup · iconv.c Character conversion
Components 23
Name services
- Service lookup API
nss/service-lookup.c - NSS dispatch
nss/service-lookup.c - Files backend
nss/nss_files/files-service.c - NIS backend
nis/nss_nis/nis-service.c - NIS+ backend
nis/nss_nisplus/nisplus-service.c - Hesiod backend
hesiod/nss_hesiod/hesiod-service.c - Service cache
nscd/servicescache.c - NSCD protocol
nscd/nscd-client.h
Runtime and loading
- Process startup
csu/libc-start.c - Dynamic loader
elf/rtld.c
POSIX facilities
- POSIX threads
htl/pt-create.c - Buffered I/O
libio - Directory access
dirent/opendir.c - Assertions
assert/assert.c
Text and conversion
- Character types
ctype/ctype.c - Character conversion
iconv/iconv.c - Encoding modules
iconvdata
Networking and security
- DNS resolver
resolv/res_query.c - DNS query builder
resolv/res_mkquery.c - Password hashing
crypt/crypt.c
Other components
- C application
- DNS servers
- Operating system
Connections 22
- C application → Service lookup API: requests service
- Service lookup API → NSS dispatch: dispatches lookup
- NSS dispatch → Files backend: selects source
- NSS dispatch → NIS backend: selects source
- NSS dispatch → NIS+ backend: selects source
- NSS dispatch → Hesiod backend: selects source
- Service cache → Files backend: resolves service data
- C application → DNS resolver: requests DNS
- DNS resolver → DNS query builder: builds query
- DNS resolver → DNS servers: sends query
- DNS servers → DNS resolver: returns response
- C application → Process startup: starts process
- C application → Dynamic loader: loads shared objects
- C application → POSIX threads: creates threads
- C application → Buffered I/O: uses streams
- C application → Directory access: reads directories
- C application → Assertions: checks conditions
- C application → Character types: classifies characters
- C application → Character conversion: converts encodings
- Character conversion → Encoding modules: uses conversion modules
- C application → Password hashing: hashes passwords
- Process startup → Operating system: initializes process