4 ms·
I remember you could decide which glibc version, for some specific symbol, you wanted to use. For example, if you wanted to make your program use the "realpath
by severino 5y ago
I remember you could decide which glibc version, for some specific symbol, you wanted to use.
For example, if you wanted to make your program use the "realpath" version from glibc 2.0, instead of the current one, you could do something like this:
__asm__(".symver realpath,realpath@GLIBC_2.0");
So, even if the glibc version in the build system is more modern (lets say 2.3), your code will also work with older ones, such as 2.0.
- AnIdiotOnTheNet 5y agoIs there a way to do that for every symbol? I'm asking because from what I've read from developers the only reliable way to do this is to compile on an old distribution with an old libc. So either there are problems with using this method or it is very poorly documented.
- severino 5y agoI haven't found a way, although I never had the need. I remember you could compile your software targeting a specific LSB release, and there were some tools to do that, but I don't know if it would be the same.