raco exe: fix section alignment for PE rewriting

A new resource section was aligned based on the old section's
virtual address, instead of the PE's specified section
alignment. That could make alignment round up too far, leaving
a disallowed gap in the sections' virtual addresses.
This commit is contained in:
Matthew Flatt 2018-03-26 17:41:59 -06:00
parent f8dac3d47d
commit bf0a739991

View File

@ -454,7 +454,7 @@
(define new-virtual-addr
(same-alignment
(section-virtual-addr s)
(pe-section-alignment pe)
(for/fold ([pos 0]) ([s2 (in-list (pe-sections pe))]
#:unless (eq? s s2))
(max pos