search for: readstruct

Displaying 1 result from an estimated 1 matches for "readstruct".

2005 Mar 06
1
testers sought for script to interpret ELF/klibc executables
...{2;} # Elf32_Ehdr->e_type: whether it's an executable, core, object # file or something else entirely. sub ET_EXEC () {2;} sub ET_DYN () {3;} # # ELF Private header # sub SZ_ELF32PHDR {32;} sub SZ_ELF64PHDR {56;} # Elf32_Phdr->p_type. sub PT_INTERP () {3;} # Program interpreter sub readStruct ($$$$$) { my ($fh, $off, $size, $pattern, $fieldNames) = @_; my @values; if (! seek ($fh, $off, 0)) { print "bad seek\n"; return undef; } my $data; my $rc = read ($fh, $data, $size); if (! defined ($rc) || $rc != $size) { print "short read\n"; return undef; }...