Skip to main content

executable

Function executable 

Source
pub fn executable(head: &[u8]) -> Option<Executable>
Expand description

What the leading bytes are, where they are something that runs.

cafebabe is missing on purpose. It is a Mach-O universal binary and it is also a Java class file, and telling them apart means reading the field after it and deciding whether it is an architecture count or a version. A false positive here is a warning shown to somebody about a content file that is fine, which costs more than missing a fat binary — and a fat binary’s members are Mach-O, so the single-architecture form is the common one and is caught.