zero filled loader segments #3
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Opening this just to recognise that it's here, I'm unlikely to work on this soon.
This adds support for having loader regions that are zero-filled, where either the entire region is zeroed or the end part, as in for ELF files (we are really just reinventing an ELF file here).
At the moment, whilst the loader.rs and loader.c code works fine, making the changes to use this for the restof the tool breaks. This is essentially because we used to be able to patch symbols that were located in the
.bssregion as we stored the zero-filled data, now, we cannot. See the changes for.data.patchedin libmicrokit for an example of how this affects people.The same thing will happen for most user programs, I think. So this might break things.
However, if we removed the changes to use it for ELF files, we can remove the hardcoding for the heap zero-initialised region (though this is being removed anyway).