I'm trying to track down a bug in my software line. I have two release build version 2.0.962 and 2.0.966. The only difference between these versions is a lib.so file. In order 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 release builds.
Is there a command line tool for printing the version of a shared object?
Each file has a different number at the end of it. These numbers represent versions of the library. They're very important as it's these versions that determine the role of each file. They're two popular versioning schemes.
The safest option is to query /etc/os-release file using grep or cat command. Systemd based Linux distro users can use the hostnamectl command. About the author: Vivek Gite is the founder of nixCraft, the oldest running blog about Linux and open source.
Yes, the ". 1" indicates the version number. This makes it possible to have multiple versions of the same library side-by-side, whereas the most common version has a link with no version number. If there is no need to distinguish between different versions, the version suffix might not be present.
Shared libraries (also called dynamic libraries) are linked into the program in two stages. First, during compile time, the linker verifies that all the symbols (again, functions, variables and the like) required by the program, are either linked into the program, or in one of its shared libraries.
I never did native android programming but as Android uses Linux kernel, the executable format used will most likely be "ELF". As far as ELF is concerned, there is no version information of Shared object stored in the file. So unless the file name itself is saying something like "libXXX.VERSION.so"
, there is no other way to find out the version number of the shared object. This technique is generally used in Linux.
My suggestions for solving your issue are:
Source: http://man7.org/linux/man-pages/man5/elf.5.html Note: E_VERSION in the executable is the version of ELF format, not of executable.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With