This PR implements the prototype for the dynamic linker for the runtime. It currently is not hooked up to anything by default, since it's still in-progress, but I wanted to get the framework in before I start writing the actual monitor and stuff, which will require fleshing out the dynamic linker a bit in the process.
Currently, it can:
Load a DSO (dynamic shared object)
Enumerate a DSO's dependencies and load those, maintaining a dependency graph
Perform relocation processing (we support only a subset of relocations for now, adding as needed)
Track constructors for calling during, well, construction
Track TLS templates and initialized a static TLS region (currently only ELF variant II supported)
It is designed to be a library that is usable both inside the runtime and when bootstrapping the runtime.
Not implemented (future PRs):
ARM support (needs TLS variant I)
Tracking destructors and maintaining a DSO lifecycle
dlopen-like functionality
Debugging support (iterating through libraries and program headers)
TLS optimizations
Many more relocation types
Lazy PLT and runtime hooks for handling lazy relocs
This PR implements the prototype for the dynamic linker for the runtime. It currently is not hooked up to anything by default, since it's still in-progress, but I wanted to get the framework in before I start writing the actual monitor and stuff, which will require fleshing out the dynamic linker a bit in the process.
Currently, it can:
It is designed to be a library that is usable both inside the runtime and when bootstrapping the runtime.
Not implemented (future PRs):