Hello,
I’ve noticed that for applications, most of the time the version number is indicated (via the resource of the binary of the application or via the attributes attached to that application)
For libraries, what are we supposed to have ?
I’ve noticed several things :
- Version number not relevant :
version -n /system/lib/libtracker.so
0 0 0 d 0
- Version number indicated :
version -n /system/lib/libbe.so
1 0 0 b 9
- Version number not indicated (but visible in the filename):
version -n /system/lib/libboost_atomic.so.1.83.0
Version unknown!
I guess there’s a distinction between core libraries required by Haiku versus external libraries (like boost)
Never seen it used like this (still can learn a thing or two ), but also never really checked versions for system libraries.
For package libraries I mostly run a check for the SONAME changes with readelf:
~> readelf -d /system/lib/libboost_atomic.so.1.83.0
Dynamic section at offset 0x2020 contains 23 entries:
Tag Type Name/Value
0x0000000000000001 (NEEDED) Shared library: [libstdc++.so.6]
0x0000000000000001 (NEEDED) Shared library: [libgcc_s.so.1]
0x0000000000000001 (NEEDED) Shared library: [libroot.so]
0x000000000000000e (SONAME) Library soname: [libboost_atomic.so.1.83.0]
0x000000000000000c (INIT) 0xca0
0x000000000000000d (FINI) 0x1aa1
0x0000000000000004 (HASH) 0x120
0x0000000000000005 (STRTAB) 0x578
0x0000000000000006 (SYMTAB) 0x200
0x000000000000000a (STRSZ) 1067 (bytes)
0x000000000000000b (SYMENT) 24 (bytes)
0x0000000000000003 (PLTGOT) 0x21f0
0x0000000000000002 (PLTRELSZ) 408 (bytes)
0x0000000000000014 (PLTREL) RELA
0x0000000000000017 (JMPREL) 0xb08
0x0000000000000007 (RELA) 0xa60
0x0000000000000008 (RELASZ) 168 (bytes)
0x0000000000000009 (RELAENT) 24 (bytes)
0x000000006ffffffe (VERNEED) 0x9f0
0x000000006fffffff (VERNEEDNUM) 2
0x000000006ffffff0 (VERSYM) 0x9a4
0x000000006ffffff9 (RELACOUNT) 2
0x0000000000000000 (NULL) 0x0
1 Like
The most important thing is the SONAME for 3rd party libraries (the one visible in the filename). For libbe, libtracker and other libraries we inherit from BeOS, there isn’t one, because adding one would break BeOS apps. We will introduce one if/when we make new incompatible libraries (probably in R2).
The one in resources is only indicative and not used for much. Since it’s not used, we have not done a particularly good job at keeping it synchronized between various things. Likewise for all other apps in Haiku source tree, we very rarely change it and it’s pretty much what the last developer who touched it decided to put there. Some of them roughly match the Haiku version, others were imported from pre-existing sources and kept their existing versioning.