I have a copy of the expat XML processing library on an embedded system runni开发者_开发技巧ng busybox 0.61. I need to find out the version of the library, but I don't have the 'strings' or 'what' applications on the image, nor can I recompile the image. These busybox images that I'm forced to use a grossly impaired.
Is there any way for me to find out what version of the expat library is installed without the 'strings' or 'what' utilities ? The library is shared (libexpat.so.1)
If this is just a one-time problem, couldn't you copy the library to another machine that has strings
installed and run it there?
You will have to write your own equivalent of 'strings'. Versions aren't part of the elf format. Some libraries happen to contain a string with a version, others do not.
For expat in particular you might get a good idea by using nm to see what APIs are present and absent. Programmatically, that'd dlopen and dlsym.
If it is libexpat 1.95.0 or later, the library will have a XML_ExpatVersion()
function which returns a char *
containing the library version.
Run ident
against the library to find out what version it is. It is similar to strings
but it picks out the revision source control library identifiers.
Hope this helps, Best regards, Tom.
精彩评论