Skip to content
This repository has been archived by the owner on Jul 15, 2023. It is now read-only.

For 64-bit assemblies, preserve the imagebase value when rewriting. #410

Merged
merged 2 commits into from
May 3, 2016

Conversation

mike-barnett
Copy link
Contributor

Up until now, the .imagebase value written into assemblies was 0x400000. This works for 32-bit assemblies, but not for 64-bit assemblies. So I tried to preserve the value read in on an assembly and use that when writing it. This seems to work for 64-bit assemblies, but for some reason can create a bad 32-bit assembly if the input assembly had a value greater than the default. I tried to debug this, but the header values written by CCI1 and CCI2 are different and it isn't clear to me how they are computed. So I left the old behavior for 32-bit assemblies and have the new behavior only for 64-bit assemblies.

@SergeyTeplyakov
Copy link
Contributor

Looks good to me.

@SergeyTeplyakov SergeyTeplyakov merged commit 54098c5 into microsoft:master May 3, 2016
@jmckone3
Copy link

Thanks for taking care of this.

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

Successfully merging this pull request may close these issues.

3 participants