With the two patches[1][2] I recently posted, the remote driver has
started to make calls more directly into the drivers. Calls like
driver->domainMigratePrepare in [2] are exposed to the remote driver,
but shouldn't be exported for public use.
However because libvirtd links to regular libvirt.so, the calls actually
do need to be exported, so we export them as __virDomainMigratePrepare
(etc) with the double underscore and exclusion from <libvirt.h>
indicating that users of the published libvirt API should not call them.
It seems we could avoid exporting them entirely with one of these methods:
(a) Link libvirtd to the static libvirt.a.
-- Probably violates a load of distro policy and removes some supposed
benefits of dynamic linking.
(b) Build a separate shared library with a different dynamic symbol table.
-- Also removes one benefit of dynamic linking, because the two
libraries are different despite having the same code in them.
Any ideas if some advanced feature of ELF offers a way out here?
Rich.
[
1]https://www.redhat.com/archives/libvir-list/2007-July/msg00444.html
[
2]https://www.redhat.com/archives/libvir-list/2007-July/msg00357.html
--
Emerging Technologies, Red Hat -
http://et.redhat.com/~rjones/
Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod
Street, Windsor, Berkshire, SL4 1TE, United Kingdom. Registered in
England and Wales under Company Registration No. 03798903