hyperlight-dev / hyperlight-dev/hyperlight

Make elf loading respect phdr VAs

Open
#1,408 0 comments 0 reactions 0 assignees View on GitHub
lifecycle/confirmed
Dominant language
Rust
Stars
4.7k
Forks
208
Avg merge
1d 7h
Merged PRs (30d)
47

Description

Currently, we load the elf binary in an odd way that does not really respect the VAs on the segments in the file, because, in the past, the virtual memory system depended on identity-mapping for code segments, and we were trying not to use too much VA space. The logic assumes the binary is PIE, although it currently works somewhat by happenstance for at least one non-PIE binary (https://github.com/hyperlight-dev/hyperlight/pull/1385#discussion_r3132233017).

Now that we have much less dependence on identity-mapped code segments, we should change this to a more normal loader that actually creates the VAs in the header (basing PIE executables at some reasonable base address).

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.