Get the latest tech news

Picking Glibc Versions at Runtime


Using a glibc version that is different from the system-provided one shouldn't require the use of containers, as I recently heard someone claim. Let's take a look at how dynamic linking works and what the options are.

readelf tells us that the hello_c binary has three different “relocations”: in other words, it has three different “gaps” that need to be patched at runtime with the address of the code that supplies those symbols. As a final note, see how I chose to invoke the dynamic linker explicitly —just as the kernel would do when asked to launch a dynamically-linked binary—instead of directly running hello_c. Unix has been around for a long time and there exist alternate solutions to problems that don’t require full replicas of a functioning system.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of runtime

runtime

Photo of Glibc Versions

Glibc Versions

Related news:

News photo

GraalPy – A high-performance embeddable Python 3 runtime for Java

News photo

Honey, I shrunk {fmt}: bringing binary size to 14k and ditching the C++ runtime

News photo

An AI that unexpectedly modified its own source code