flâneur

How to execute an object file: Part 1

blog.cloudflare.com · 3,719 words · saved by 2 readers

Ever wondered if it is possible to execute an object file without linking? Or use any object file as a library? Follow along to learn how to decompose an object file and import code from it along the way.

Calling a simple function without linking When we write software using a high-level compiled programming language, there are usually a number of steps involved in transforming our source code into the final executable binary: First, our source files are compiled by a compiler translating the high-level programming language into machine code. The output of the compiler is a number of object files. If the project contains multiple source files, we usually get as many object files. The next step is the linker: since the code in different object files may reference each other, the linker is…

saved by

related reading