Sunday, April 10, 2011

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

1 comment:

  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

Oracle - Reclaim disk space

Oracle does not release disk space even if you had delete the data or tablespace. If you have enterprise manager, you should use it to  rec...