Find whether a Windows dll is compiled for 32 or 64 bits on Linux
This morning, I stumbled upon an unexpected problem; and found myself not knowing what to do.
I had to compile the native part of a library on Linux, based on the existing Windows dlls. Before compiling, I needed to know if the Windows dlls were compiled for 32 or 64 bits.
It is quite easy to do on Windows, with tools such as dependency walker, but on Linux!?
I knew that for native linux (.so) files, objdump would be my weapon of choice.
So I gave it a shot, and tried:
And here was the result :
Pretty neat, huh?
I was really not expecting objdump to be so efficient even on Windows stuff.
Well done, Linux. Well done.