Revert "re-enable"

This reverts commit 644a12e7aa.
This commit is contained in:
Folkert 2022-10-19 17:41:46 +02:00
parent 644a12e7aa
commit d0492327e8
No known key found for this signature in database
GPG key ID: 1F17F6FFD112B97C

View file

@ -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)]