Skip to content

Commit

Permalink
Revert unnecessary changes
Browse files Browse the repository at this point in the history
  • Loading branch information
kkent030315 committed Oct 26, 2024
1 parent b307a5b commit 00c5d78
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/pe/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -439,15 +439,7 @@ impl<'a> ctx::TryIntoCtx<scroll::Endian> for PE<'a> {
_ => None,
};

// COFF Symbol Table
// Auxiliary Symbol Records
// COFF String Table
assert!(
self.header.coff_header.pointer_to_symbol_table == 0,
"Symbol tables in PE are deprecated and not supported to write"
);

bytes.gwrite_with(self.header.clone(), &mut offset, ctx)?;
bytes.gwrite_with(self.header, &mut offset, ctx)?;
max_offset = max(offset, max_offset);
self.write_sections(bytes, &mut offset, file_alignment, ctx)?;
// We want the section offset for which we have the highest pointer on disk.
Expand All @@ -462,6 +454,14 @@ impl<'a> ctx::TryIntoCtx<scroll::Endian> for PE<'a> {
max_offset,
);

// COFF Symbol Table
// Auxiliary Symbol Records
// COFF String Table
assert!(
self.header.coff_header.pointer_to_symbol_table == 0,
"Symbol tables in PE are deprecated and not supported to write"
);

// The following data directories are
// taken care inside a section:
// - export table (.edata)
Expand Down

0 comments on commit 00c5d78

Please sign in to comment.