For Checking whether a particular windows dll is of 32 or 64 bit, reading PE header will yield the needed result. But there is a need to find whether a linux file (.so) is of 32 or 64 bit.
When searched, found linux shell scripts or commands which help to find this information. But we need to find this from a windows environment. Any windows commands or code which runs on Windows OS should be able to provide this info.
It sounds like you want to be able to check this programmatically, rather than rely on installing Cygwin (as that may be overkill if you just need to check the file status). You can mimic what the
file
command is doing by looking up the ELF section in themagic
table (in/usr/share/misc/magic
on Cygwin):I don't know the exact syntax of the
magic
format rules, but it looks to me like might need to check the 5th byte which will be 1 for 32-bit and 2 for 64-bitThe easiest way would be to install Cygwin and use the
file
command: