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.
This PR adds virtual addresses support for RELs
splits.txt
andsymbols.txt
files. This would resolve #98.Implementation
The main implementation goal was make changes in the 'front-end' without touching the 'back-end'. Virtual addresses get converted to REL addresses upon parsing, which the REL address is used for the remainder of runtime. A virtual address field was also added to
ObjSymbol
to support virtual addresses in objdiff.Usage
To use, the user needs to add the
virtual_address:{offset_virtual_address}
attribute to each section definition in splits.txt. For exampleWill become
From here, the user needs to adjust the addresses in
splits.txt
, and the addresses and auto generated names insymbols.txt
to be virtual.Feedback
This is my first time writing Rust, so I'm sure there are some 'code smells' as a result; feedback related to that is greatly appreciated.
Other than that, I want to bring up requiring users to adjust addresses and names in
symbols.txt
andsplits.txt
themselves. I believe automating this through dtk is out of scope for this PR. It would require relatively significant refactoring and risks introducing breaking changes. I think requiring the user to make a script to make adjustments would be the best option for now.