Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
LibELF: Actually do the library mapping as early as possible
We previously trusted the `map` part in `map_library` too much, and assumed that this would already lock in the binary at its final place. However, the `map()` function of the loader was only called in `load_main_library`, which ran only right before jumping to the entrypoint. Make our binary loading a bit more stable by actually mapping the binary right after we read its information, and only do the linking right before jumping to the entrypoint.
- Loading branch information