unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
To: notmuch@notmuchmail.org
Subject: Re: hiding xapian symbols
Date: Tue, 21 Jun 2011 22:05:15 -0400	[thread overview]
Message-ID: <4E014DDB.20001@fifthhorseman.net> (raw)
In-Reply-To: <1308704923-14748-1-git-send-email-david@tethera.net>

[-- Attachment #1: Type: text/plain, Size: 1349 bytes --]

On 06/21/2011 09:08 PM, david@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



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 1030 bytes --]

  parent reply	other threads:[~2011-06-22  2:05 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-22  1:08 david
2011-06-22  1:08 ` [PATCH 1/2] libnotmuch: add linker script to declare only notmuch_* symbols as global david
2011-06-22  1:08 ` [PATCH 2/2] remove Xapian exceptions symbols from libnotmuch1.symbols david
2011-06-22  2:05 ` Daniel Kahn Gillmor [this message]
2011-06-22  2:57   ` hiding xapian symbols David Bremner
2011-06-22 12:02     ` [PATCH] tests: add a test for symbol hiding side effects david
2011-06-23 10:24       ` David Bremner
2011-06-23 22:26         ` Carl Worth

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4E014DDB.20001@fifthhorseman.net \
    --to=dkg@fifthhorseman.net \
    --cc=notmuch@notmuchmail.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).