Opened 5 years ago
Loading as a service
|Reported by:||Jiri Svoboda||Owned by:|
|Blocker for:||Depends on:|
Currently binaries are loaded by spawning a new instance of the loader task. The loader task reads the binary (plus shared objects) into its own address space and then transfers control to the loaded executable.
This leads to every task containing a copy of the loader (wasting/polluting the virtual address spaces) and to the need for the somewhat delicate handover procedure between the two instances of C runtime in the same address space.
An alternate approach is to have a task loading service that creates an empty task and then loads the binary and shared objects into it remotely. This requires extending the current remote task manipulation framework (Udebug). For dynamically linked executables, there is the additional need to remotely relocate at least some of the dynamic modules before starting the task (since HelenOS RTLD cannot bootstrap itself).
This new loading service would be provided by the task restarter. This would allow the task restarter to keep the information about mapping of shared objects into the task's address space.