hiding xapian symbols

Daniel Kahn Gillmor dkg at fifthhorseman.net
Tue Jun 21 19:05:15 PDT 2011


On 06/21/2011 09:08 PM, david at tethera.net wrote:
> Here is my proposal, based on Clint's suggestion on IRC, and on the
> sed hack from librhash, to hide all symbols that are not explicitly
> part of the notmuch API. In particular it hides the various symbols
> related to Xapian exceptions.

I like this proposal -- i would be really glad to not see the mangled
Xapian symbols in libnotmuch.so.

However, i'm concerned that the act of hiding these symbols will make it
so that any program that tries to link both libnotmuch and libxapian
will be unable to use these symbols.

Consider the visiblity rules [0]:

>> Symbol visibility is "default" by default but if the linker encounters 
>> just one definition with it hidden - just one - that typeinfo symbol 
>> becomes permanently hidden (remember the C++ standard's ODR - one 
>> definition rule). 


This makes me think that a program that links against libnotmuch and
libxapian, but actually tries to *use* libxapian's exception handling
may have a problem.

This is probably best resolved by writing such an executable and seeing
if it behaves, but alas, i haven't done that work.   Any takers?
Perhaps this could be a test in the notmuch test suite?

	--dkg


[0]
http://gcc.gnu.org/wiki/Visibility#Problems_with_C.2B-.2B-_exceptions_.28please_read.21.29


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 1030 bytes
Desc: OpenPGP digital signature
URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20110621/1c5acead/attachment.pgp>


More information about the notmuch mailing list