You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some structures in the PE file format (such as CodeSegment and TlsDirectory) rely on a virtual address (VA) rather than a relative virtual address (RVA). Currently, ISegment.UpdateOffsets only takes a file offset and an RVA. This means that implementations for these structures need an additional ImageBase property or similar for them to be able to implement their Write method. This is problematic, as this is not necessarily in sync with image base of the underlying PE image. Rebasing a PE image would therefore require manually setting all these image bases of these models.
Proposal
Add an ulong imageBase parameter to ISegment.UpdateOffsets. This ensures that all segments can be rebased automatically without any need for a separate property or similar that needs to stay in sync.
Alternatives
None yet.
Additional context
This would be a breaking change for all classes that implement ISegment. This might be a minor issue though, since not many users will actually implement their own version of ISegment.
The text was updated successfully, but these errors were encountered:
Problem Description
Some structures in the PE file format (such as
CodeSegment
andTlsDirectory
) rely on a virtual address (VA) rather than a relative virtual address (RVA). Currently,ISegment.UpdateOffsets
only takes a file offset and an RVA. This means that implementations for these structures need an additionalImageBase
property or similar for them to be able to implement theirWrite
method. This is problematic, as this is not necessarily in sync with image base of the underlying PE image. Rebasing a PE image would therefore require manually setting all these image bases of these models.Proposal
Add an
ulong imageBase
parameter toISegment.UpdateOffsets
. This ensures that all segments can be rebased automatically without any need for a separate property or similar that needs to stay in sync.Alternatives
None yet.
Additional context
This would be a breaking change for all classes that implement
ISegment
. This might be a minor issue though, since not many users will actually implement their own version ofISegment
.The text was updated successfully, but these errors were encountered: