Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for split program images #164

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

nspin
Copy link
Member

@nspin nspin commented Jul 9, 2024

There are cases where it would be useful to be able specify the program image separately from the symbols that will be used to manipulate it.

seL4/rust-sel4#167 adds support for resettable protection domains. The best way that I've come up with to achieve this requires manipulating the program image after linking. Specifically, a new program image is created from the original, and the result is an ELF file with only program headers, and no section headers. The symbol and debugging information in the original ELF file still apply to the final program image. So, we are left with one ELF file specifying the program image, and one ELF file with symbol and debugging information.

This PR adds support for the optional path_for_symbols attribute on the <program_image> element, which allows for such a split program image.

@nspin
Copy link
Member Author

nspin commented Sep 18, 2024

I've updated the PR. I've also moved code around to minimize the diff to make it easier to review. If it is going to be accepted, I'll reorganize the code again in an additional to make it more natural to read linearly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant