Can I get a version of a shared object?

I am trying to find a bug in my software line. I have two release versions 2.0.962 and 2.0.966. The only difference between these versions is the lib.so file. To figure out where to start looking in the source tree for lib.so, I need to know its version number in each of the build versions.

Is there a command line tool to print a version of a shared object?

+3


source to share


1 answer


I have never done Android programming, but since Android uses the Linux kernel, the executable format used is likely to be "ELF". As far as ELF is concerned, there is no information about the Shared object stored in the file. So unless the filename says something like "libXXX.VERSION.so"

, there is no other way to find out the version number of the shared object. This method is commonly used on Linux.

My suggestions for solving the problem:



  • Use date modified if possible to separate shared objects
  • Use dlopen () or similar to open the shared object and try to see the exported functions.

Source: http://man7.org/linux/man-pages/man5/elf.5.html Note: E_VERSION in the executable is the version of the ELF format, not the executable.

0


source







All Articles