Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Have a static lib, is there a simple way to know it is for 32 bit or 64 bit?

Is there any tool that can directly test if a library is made for 32 or 64 bit?

like image 658
user705414 Avatar asked May 16 '11 07:05

user705414


People also ask

How can I tell if a LIB file is 64-bit?

Therefore, the “/usr/lib/libc-2.33.so” file is a 64-bit library and the other one is a 32-bit library. Also, if we have a look at their “start address” fields, they have 64-bit and 32-bit wide addresses respectively.

How do I know if my windows is 32-bit or 64-bit?

Just run it and have a look at the Processes tab in Windows Task Manager. If there is a *32 suffix after the process name, it's 32-bit, otherwise it's 64-bit (provided you're on a 64-bit OS).

How do I know if my Linux file is 32-bit or 64-bit?

If you're interested in the CPU itself, look at /proc/cpuinfo for details about the CPU(s) detected by the Linux kernel. which tells us that it's a 32-bit executable using the Intel 80386 instruction set (possibly with extensions). Note that it isn't quite as simple as 32-bit versus 64-bit architectures.


1 Answers

Run a visual studio command prompt to ensure your path can find dumpbin.exe

Pipe to findstr to save on the big spew about each section and optionally you can use a wildcard to analyse a folder of libs.

dumpbin /headers *.lib | findstr machine

Example of what you're looking for;

8664 machine (x64) 
like image 173
Jet Set Willy Avatar answered Oct 12 '22 04:10

Jet Set Willy