Fix RVA field alignment #888
Loading…
Reference in a new issue
No description provided.
Delete branch "fixAlignmentUpstream"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Upstreaming the change from https://github.com/dotnet/cecil/pull/55.
Fixes https://github.com/dotnet/runtime/issues/79477, specifically, the problem described in https://github.com/dotnet/runtime/issues/79477#issuecomment-1354917614.
This ensures that section starts are aligned by adjusting the previous
Range's length to ensure the computed start of a newRangemeets the alignment requirements. It was done this way rather than just computing an aligned start for the newRange, because theTextMapassumes that theRanges are contiguous - see for exampleGetNextRVA.@jbevain I'm updating the pipeline to use
ubuntu-20.04instead ofubuntu-latest. The ubuntu job was failing because theubuntu-latestimages no longer include the older versions of .NET Core: https://github.com/actions/runner-images/issues/6399.The windows job is also failing when running peverify on some unrelated exes in this repo:
I'm not sure why this is - it appears unrelated to this recent change to
windows-latest, since it fails the same way when usingwindows-2019.Fixed the test failures, which were of course related to my change (I had somehow convinced myself they were unrelated, but in retrospect it is obvious). The problem was the use of
GetNextRVAto compute theCodeRVA, before adding that segment to the TextMap.Thanks @sbomer!