It's well known that glibc (and, as far as I know, glibstd++ also) uses symbol versioning mechanism. (For the details refer: How can I link to a specific glibc version.)
The question is how to determine exact versions of GLIBC and GLIBCXX will be chosen by linker for names from libc and libstdc++? For example, how to get something like this:
time -> time@GLIBC_2_5
...
gethostbyname -> gethostbyname@GLIBC_2_3
Why do we need this? It seems to me that it can be useful if you want to minimize required versions of glibc/libstdc++.
One thing you can try is running objdump -T
on your binary.
If you are considering linking to older versions of symbols, be aware that these older versions may depend on older, different structures or other definitions as well. To avoid this, compile and link with older, matching header files and libraries.
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