DEV Community

ThatOSDeveloper
ThatOSDeveloper

Posted on

Dynamic Linking, and why I hate it and love it

Dynamic linking is a method of loading libraries on the fly instead of compiling them directly into the binary. For example: .dll files on Windows or .so files on Linux. These files are loaded into a spot in memory and then used by the application as if they were part of the code.

What I love about this is that app binaries stay small and can share common libraries. The downside, in my opinion, is that to support dynamic linking, you need a more advanced ELF loader that can parse and work with these types of files. Implementing this means parsing even more of the ELF standard, which is around 300 pages long. While it's not impossible to implement fully, it's far more difficult than supporting a minimal subset for static binaries (ones that don't use dynamic linking at all).

I like the idea and do plan to implement it in the Mantle kernel, but it's going to be on the backburner for quite some time.


Side note:

I’ve moved the Mantle kernel to Codeberg, since I disagree with some of the privacy violations on GitHub.

The repository is now here.

Note: You’ll need a Codeberg account and be logged in to view it — this is to stop AI scrapers from accessing it.

Side note 2:

I also created a repository called SlugOS-base, which is meant to be the "base" version of SlugOS — a minimal foundation that other "distros" can build upon.

Top comments (0)