Do we need to bump the shared library version for 2.4.0?
Joe Orton
joe at manyfish.co.uk
Wed Jun 4 12:44:01 CEST 2008
On Wed, Jun 04, 2008 at 11:42:54AM +0100, Joe Orton wrote:
> On Mon, May 26, 2008 at 04:31:31PM +0200, Simon Josefsson wrote:
> > 3) Don't increment the shared library version at all.
> >
> > The justification would be that we haven't removed any symbols, all
> > symbols in libgnutls-extra are still available via libgnutls and work
> > the same way. The only thing that would break here is if someone is
> > dlopen'ing libgnutls-extra.so and calls the openpgp related
> > functions. Strictly speaking I'm not sure this is a valid approach,
> > since we HAVE removed symbols from libgnutls-extra.
>
> Having looked into this, I can't see why that would break. dlsym() will
> still find the symbols since libgnutls-extra.so is linked against
> libgnutls; the wording in POSIX is very specific that this must be the
> case. Attached a test case which finds gnutls_malloc via dlopen of
> libgnutls-extra.so for PoC.
Now, really attached :)
joe
-------------- next part --------------
#include <dlfcn.h>
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char **argv)
{
void *handle, *fn;
handle = dlopen("libgnutls-extra.so", RTLD_NOW|RTLD_LOCAL);
if (!handle)
abort();
fn = dlsym(handle, "gnutls_malloc");
if (!handle)
abort();
puts("ok");
return 0;
}
More information about the Gnutls-devel
mailing list