ld
and the art of linking dependencies 🔗
What is linking? How is dynamic linking different from static linking?
Why is it important? Plugin systems, inter-operable with other languages, hot reloading, faster and efficient compiles, examples from open source projects
What tools are used to understand, debug and link libraries - ld, ldd, nm, readelf
Mental model for how linking works within the linux process memory model
The above talk will be threaded through a live demo session that will implement a small string interning example program in C + Rust + Python codebase. Attendees are encouraged to follow along with clear instructions in a checkpoint-ed repo.
Compiling, linking and executing a simple C program using GCC
The C program links to Ustr a popular rust string interning library
A rust program links to the C program (which links to Ustr)
A python program dynamically links to the rust program (which links to the C program (which links to Ustr)) 🤯
By the end of this madness, you will have a crystal clear understanding of how programs in different languages can interoperate with each other 😁.
This workshop talk uncovers all the gory details and interesting insights that piqued my curiousity as a novice systems programmer. While a basic familiarity with the C programming model is expected, beginners are encouraged to attend.
Strong mental model for how linking and loading libraries work
Strong mental model of foreign function interfaces (FFI) and inter-operable programs
Tools and techniques for understanding and building inter-operable programs