[libvirt] PATCH: 2/12: Make use of versioned linker scripts

Daniel P. Berrange berrange at redhat.com
Thu Nov 13 21:44:42 UTC 2008


On Thu, Nov 13, 2008 at 06:31:04PM +0100, Daniel Veillard wrote:
> On Thu, Nov 13, 2008 at 05:21:23PM +0000, Daniel P. Berrange wrote:
> > This patch changes the way we use linker scripts to have fully versioned
> > symbols, and a versioned private section for symbols needed by libvirtd
> > and virsh.
> 
>   Just a couple of questions:
> 
> > +++ b/src/driver.h	Tue Nov 11 17:28:31 2008 +0000
> > @@ -73,7 +73,7 @@
> >  typedef int
> >          (*virDrvClose)			(virConnectPtr conn);
> >  typedef int
> > -    (*virDrvSupportsFeature) (virConnectPtr conn, int feature);
> > +    (*virDrvDrvSupportsFeature) (virConnectPtr conn, int feature);
> 
>   I miss the point ... err why ?

When I removed the __ from the 'private' symbols exported, this
internal driver typedef now clashes with the following public
symbol:

> -    ret->supported = __virDrvSupportsFeature (client->conn, args->feature);
> +    ret->supported = virDrvSupportsFeature (client->conn, args->feature);
>     if (ret->supported == -1) return -1;

The DrvDrv looks a little odd, but it is actually consistent with
the naming for driver.h, which is basically s/vir/virDrv/ against
the public API :-)


> 
> ...]
> > diff -r bbf3d0bc9d49 src/libvirt_sym.version.in
> [...]
> > +LIBVIRT_0.5.0 {
> > +    global:
> > +	virDomainCreateXML;
> > +	virEventRegisterImpl;
> > +	virConnectDomainEventRegister;
> > +	virConnectDomainEventDeregister;
> > +} LIBVIRT_0.4.5;
> > +
> > +/* .... define new API here using predicted next version number .... */
> 
> So basically as part of doing a release I should guess the new version
> number and make a template empty section here, commited after tagging
> the release.

Yeah, that'd be a reasonable thing todo - just add .1 to the existing
version. If we end up adding lots of new symbols, it'll be fairly obvious
that we should increment a major version number instead.

Daniel
-- 
|: Red Hat, Engineering, London   -o-   http://people.redhat.com/berrange/ :|
|: http://libvirt.org  -o-  http://virt-manager.org  -o-  http://ovirt.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505  -o-  F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|




More information about the libvir-list mailing list