Skip to main content

write_dump

Function write_dump 

Source
pub fn write_dump(
    dfd: &mut File,
    progs: &[wcfunc],
    map: i32,
    hlen: i32,
    tlen: i32,
) -> Result<(), Error>
Expand description

Port of write_dump(int dfd, LinkList progs, int map, int hlen, int tlen) from Src/parse.c:3334. Writes the prelude + header records + body wordcode bytes to the dump file descriptor.

Two passes: first native-byte-order (FD_MAGIC), then opposite- byte-order (FD_OMAGIC) so big-endian readers can mmap the same file. Bodies are byte-swapped via fdswap on the second pass.