[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Shared library - static link specific dependency

From: Bob Friesenhahn
Subject: Re: Shared library - static link specific dependency
Date: Sat, 14 Jun 2008 10:26:48 -0500 (CDT)

On Sat, 14 Jun 2008, Alon Bar-Lev wrote:
As far as I understand, if I have PKCS#11 provider (library) with
OpenSSL linked within it, and application loads it, there is not
symbol mixups, as the symbols of embedded OpenSSL implementation are
not exposted to the application. And as the interface between
application and the library does not share any OpenSSL related
element, it should work perfectly even if the application load
incompatible OpenSSL library.

A fundamental precept of libtool is that it should always be possible to build everything static in a portable way. Building shared libraries is a luxury that libtool enables (when possible).

In my experience, the popular Linux OS does not prevent duplicate symbols from being used. If these similarly named symbols actually represent somewhat different code, then very bad things can happen.

An excellent example of this is the Ghostscript shared library which includes some modified libjpeg functions yet also links against shared libjpeg to reduce code size. This works fine for Ghostscript but an application which uses both libjpeg and the Ghostscript shared library is likely to pick up the modified versions in Ghostscript rather than the expected ones in libjpeg. I know this because it happens to my application (which then crashes).

Bob Friesenhahn
GraphicsMagick Maintainer,

reply via email to

[Prev in Thread] Current Thread [Next in Thread]