1.1.2 • Published 4 years ago

windows-binary-architecture v1.1.2

Weekly downloads
522
License
MIT
Repository
github
Last release
4 years ago

windows-binary-architecture

Installation

# with npm
npm install windows-binary-architecture

# with yarn
yarn add windows-binary-architecture

What is this about

Find the target CPU architecture of Windows binaries (DLLs, EXEs and others).

The module exposes a single function, getTargetArch(path, callback(err, archName, archCode)) which opens an executable file and determines what CPU architecture the file was built for, by calling your callback with a name for the architecture and its code, according to the table on the Windows documentation, reproduced here.

NameValueDescription
UNKNOWN0x0The contents of this field are assumed to be applicable to any machine type
AM330x1d3Matsushita AM33
AMD640x8664x64
ARM0x1c0ARM little endian
ARM640xaa64ARM64 little endian
ARMNT0x1c4ARM Thumb-2 little endian
EBC0xebcEFI byte code
I3860x14cIntel 386 or later processors and compatible processors
IA640x200Intel Itanium processor family
M32R0x9041Mitsubishi M32R little endian
MIPS160x266MIPS16
MIPSFPU0x366MIPS with FPU
MIPSFPU160x466MIPS16 with FPU
POWERPC0x1f0Power PC little endian
POWERPCFP0x1f1Power PC with floating point support
R40000x166MIPS little endian
RISCV320x5032RISC-V 32-bit address space
RISCV640x5064RISC-V 64-bit address space
RISCV1280x5128RISC-V 128-bit address space
SH30x1a2Hitachi SH3
SH3DSP0x1a3Hitachi SH3 DSP
SH40x1a6Hitachi SH4
SH50x1a8Hitachi SH5
THUMB0x1c2Thumb
WCEMIPSV20x169MIPS little-endian WCE v2
nullUnknown architecture, name is null and the architecture code is sent to the callback as-is