Linux - Check Shared Object Compile Version

If you want to check whether a shared object (.so) is 32 bits or 64 bits compiled, you can use the following commands

1. file XXX.so

This file command will output the file type of the given file. It will work for .so files. Look for ELF XX-bit in the output. It will tell you whether the file is 32 bits or 64 bits compiled.




2. readelf -h XXX.so

Thie readelf command will output the information about elf files. Look for Class: ELFXX where XX will tell you whether the file is 32 bit or 64 bit compiled


Please note that readelf -h works for archive files (.a) as well.

For windows, see Dumpbin command

Comments

  1. Thanks for giving such a useful command.As you said that in Linux it will check whether a shared object is 32 bits or 64 bits compiled that solves my problem at hand.
    digital id

    ReplyDelete

Post a Comment

Popular posts from this blog

FFMPEG - Creating timelapse with FFMPEG with JPEG

MP4 File Format Part 1

RTSP - RTP over TCP