You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Implement simple cross-platform/arch ELF loader for executables #5351
Today we are using platform-native shared libraries for dynamically loading compiled executables. This is a good path for tooling as then platform-native debuggers, profilers, and backtraces all work correctly. It's not a good path for deployment, though, as it requires us to embed a compiled artifact per architecture crossed with each target platform. Instead we should just use ELF everywhere and load ourselves. Our shared libraries are by design extremely simple and we control all of the linker parameters for them meaning that we only need to implement a tiny subset of features. There are still cases where we may want platform-native libraries (like iOS to satisfy code signing) but they would become opt-in with the generic ELF used for everything by default.
#3845 (comment) mentions a few tricks. Relatively simple technique, just needs per-arch relocation shims and ABI thunks to marshal registers, which is about 100 lines of code/arch total and easy to incrementally add.
Activity