mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-03 19:58:18 +00:00
parent
644a12e7aa
commit
d0492327e8
1 changed files with 11 additions and 11 deletions
|
@ -1292,17 +1292,17 @@ fn relocate_dummy_dll_entries(executable: &mut [u8], md: &PeMetadata) {
|
|||
"new .reloc section is too big, and runs into the next section!",
|
||||
);
|
||||
|
||||
// in the data directories, update the length of the base relocations
|
||||
let dir = load_struct_inplace_mut::<pe::ImageDataDirectory>(
|
||||
executable,
|
||||
md.dynamic_relocations.data_directories_offset_in_file as usize
|
||||
+ object::pe::IMAGE_DIRECTORY_ENTRY_BASERELOC
|
||||
* std::mem::size_of::<pe::ImageDataDirectory>(),
|
||||
);
|
||||
|
||||
let old_dir_size = dir.size.get(LE);
|
||||
debug_assert_eq!(old_section_size, old_dir_size);
|
||||
dir.size.set(LE, new_virtual_size);
|
||||
// // in the data directories, update the length of the base relocations
|
||||
// let dir = load_struct_inplace_mut::<pe::ImageDataDirectory>(
|
||||
// executable,
|
||||
// md.dynamic_relocations.data_directories_offset_in_file as usize
|
||||
// + object::pe::IMAGE_DIRECTORY_ENTRY_BASERELOC
|
||||
// * std::mem::size_of::<pe::ImageDataDirectory>(),
|
||||
// );
|
||||
//
|
||||
// let old_dir_size = dir.size.get(LE);
|
||||
// debug_assert_eq!(old_section_size, old_dir_size);
|
||||
// dir.size.set(LE, new_virtual_size);
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue