It seems that glibc 2.14 introduced a new version of memcpy
(to fix bug 12518). Programs compiled against glibc 2.14+, then, will contain a dynamic link to memcpy@GLIBC_2.14
, which is clearly not available in older versions of glibc.
However, glibc 2.14+ obviously still contains the old memcpy@GLIBC_2.2.5
symbol for backwards compatibility. I'd like to be able to compile a few programs in such a way that they are binary-compatible with older glibc versions. How would one do to compile a program, on a system which has glibc 2.14+, so that it uses this old symbol version? If the procedure necessarily is compiler-specific, I'm using GCC (but it would be nice to know how to do it on other compilers as well).
(On a side note, I must admit don't know a whole lot about versioned symbols, such as how to produce them and how to use them, or whether they are ELF-specific or should be considered a standard part of modern ABIs; and I haven't managed to find any documentation about it. Are there any good sources of information on the subject?)
Glibc has a versioning system that allows backward compatibility (older programs built to run on older versions of glibc will continue to run on new glibc); but it is of no help the other way around: programs that depend on newer glibc will usually not run on systems with older glibc.
In order to allow compilation of C++ written to such drafts, G++ contains some backwards compatibilities. All such backwards compatibility features are liable to disappear in future versions of G++.
Adobe maintains compatibility within major release versions of Premiere Pro. Within a major release, project files are forward and backward compatible: you can open and save any Premiere Pro v15. x project with any 15.
The canonical document on shared libraries, symbol versioning, and related issues is Ulrich Drepper's http://www.akkadia.org/drepper/dsohowto.pdf .
To make a reference to an older symbol, you would need to find a header that declares it, then use an assembler directive:
extern void nftw_old (int) ;
asm (".symver nftw_old,nftw@GLIBC_2.3.3");
void main ()
{
nftw_old(0);
}
Note that the "nm" of the compiled executable refers to the expected previous-ABI nftw@GLIBC_2.3.3 implementation. (Don't try to run this program - the real nftw(3) function signature is different.)
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