Skip to content

Commit

Permalink
write::pe::Writer: Add write_file_align function (gimli-rs#397)
Browse files Browse the repository at this point in the history
  • Loading branch information
osiewicz authored Nov 4, 2021
1 parent 99a9c16 commit 5b6b6a9
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/write/pe.rs
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,11 @@ impl<'a> Writer<'a> {
util::write_align(self.buffer, align_start as usize);
}

/// Write padding up to the next multiple of file alignment.
pub fn write_file_align(&mut self) {
self.write_align(self.file_alignment);
}

/// Reserve the file range up to the given file offset.
pub fn reserve_until(&mut self, offset: u32) {
debug_assert!(self.len <= offset);
Expand Down

0 comments on commit 5b6b6a9

Please sign in to comment.