Versioned symbols
Hi! First, sorry if this shouldn't belong to this list. If this is the case, please point me to the appropriate list. I want to make versioned symbols as they work in Linux, but I had no success with FreeBSD. Let me say, I've app, lib1 and lib2. lib1 and lib2 have two different functions, and I link app with both. They use the following version scripts: lib1.vers -- lib1 { *; }; lib2.vers -- lib2 { *; }; Then, I rebuild lib2 to have the same lib1 function, and when app calls that function (that nows exists in lib1 and lib2) the call go to lib2. I suppose the app should call the lib1 function, as the imported function is defined with lib1 "namespace". If you want, I can post a small test case. Do exists any different on Linux and FreeBSD re. versioned symbols? Is there a way to achieve what I want? Thanks, Adriano ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Versioned symbols
On Thu, Mar 06, 2008 at 11:28:39PM -0300, Adriano dos Santos Fernandes wrote: > I want to make versioned symbols as they work in Linux, but I had no > success with FreeBSD. This seems quite relevant, specific to RELENG_7. (Said feature isn't available in earlier releases): http://www.freebsd.org/releases/7.0R/relnotes.html The rtld(1) runtime linker now supports ELF symbol versioning using GNU semantics. This implementation aims to be compatible with symbol versioning support as implemented by GNU libc and documented in http://people.redhat.com/~drepper/symbol-versioning and LSB 3.0. Also, dlvsym() function has been added to allow lookups for a specific version of a given symbol. -- | Jeremy Chadwickjdc at parodius.com | | Parodius Networking http://www.parodius.com/ | | UNIX Systems Administrator Mountain View, CA, USA | | Making life hard for others since 1977. PGP: 4BD6C0CB | ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Versioned symbols
Jeremy Chadwick escreveu: On Thu, Mar 06, 2008 at 11:28:39PM -0300, Adriano dos Santos Fernandes wrote: I want to make versioned symbols as they work in Linux, but I had no success with FreeBSD. This seems quite relevant, specific to RELENG_7. (Said feature isn't available in earlier releases): Thanks Jeremy... My usage for versioned symbols would be to have multiple shared libraries implementing the same entrypoints... For dlopen'ed libraries, I suppose there is no problem with unversioned symbols, correct? But I want a kind of Windows DLL semantics... If my app dynamic loads lib1 and lib2, that implements the same functions and latter it loads lib3, a different library linked against lib2 (-l2). I want that calls from lib3 always go to lib2. Are versioned symbols the only way to achieve that or there is another way? Thanks, Adriano ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"