mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-04 12:18:19 +00:00
round up reloc image if on boundary
This commit is contained in:
parent
bb5864c2b8
commit
69fe0464f5
1 changed files with 3 additions and 1 deletions
|
@ -1259,8 +1259,10 @@ fn relocate_dummy_dll_entries(executable: &mut [u8], md: &PeMetadata) {
|
|||
);
|
||||
|
||||
// for unclear reasons, we must bump the image directory size here.
|
||||
// we also need some zeroed-out memory at the end, so if the directory
|
||||
// ends at a multiple of `file_alignment`, pick the next one.
|
||||
let new_reloc_directory_size =
|
||||
next_multiple_of(dir.size.get(LE) as usize, md.file_alignment as usize);
|
||||
next_multiple_of(dir.size.get(LE) as usize + 4, md.file_alignment as usize);
|
||||
dir.size.set(LE, new_reloc_directory_size as u32);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue