Re: hiding xapian symbols
authorDaniel Kahn Gillmor <dkg@fifthhorseman.net>
Wed, 22 Jun 2011 02:05:15 +0000 (22:05 +2000)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:38:40 +0000 (09:38 -0800)
2c/8b0a540d6bc4c6c01bfc826c7bda5b23a5c76a [new file with mode: 0644]

diff --git a/2c/8b0a540d6bc4c6c01bfc826c7bda5b23a5c76a b/2c/8b0a540d6bc4c6c01bfc826c7bda5b23a5c76a
new file mode 100644 (file)
index 0000000..1f92f1e
--- /dev/null
@@ -0,0 +1,122 @@
+Return-Path: <dkg@fifthhorseman.net>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id 85A5D431FD0\r
+       for <notmuch@notmuchmail.org>; Tue, 21 Jun 2011 19:05:26 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 0\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]\r
+       autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id VLXu0AZqL-D8 for <notmuch@notmuchmail.org>;\r
+       Tue, 21 Jun 2011 19:05:25 -0700 (PDT)\r
+Received: from che.mayfirst.org (che.mayfirst.org [209.234.253.108])\r
+       by olra.theworths.org (Postfix) with ESMTP id D990A431FB6\r
+       for <notmuch@notmuchmail.org>; Tue, 21 Jun 2011 19:05:25 -0700 (PDT)\r
+Received: from [192.168.13.75] (lair.fifthhorseman.net [216.254.116.241])\r
+       by che.mayfirst.org (Postfix) with ESMTPSA id E5400F970\r
+       for <notmuch@notmuchmail.org>; Tue, 21 Jun 2011 22:05:23 -0400 (EDT)\r
+Message-ID: <4E014DDB.20001@fifthhorseman.net>\r
+Date: Tue, 21 Jun 2011 22:05:15 -0400\r
+From: Daniel Kahn Gillmor <dkg@fifthhorseman.net>\r
+User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US;\r
+       rv:1.9.2.17) Gecko/20110516 Icedove/3.1.10\r
+MIME-Version: 1.0\r
+To: notmuch@notmuchmail.org\r
+Subject: Re: hiding xapian symbols\r
+References: <1308704923-14748-1-git-send-email-david@tethera.net>\r
+In-Reply-To: <1308704923-14748-1-git-send-email-david@tethera.net>\r
+X-Enigmail-Version: 1.1.2\r
+Content-Type: multipart/signed; micalg=pgp-sha512;\r
+       protocol="application/pgp-signature";\r
+       boundary="------------enig8A5960AA5BA1FD58935161A0"\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+Reply-To: notmuch <notmuch@notmuchmail.org>\r
+List-Id: "Use and development of the notmuch mail system."\r
+       <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Wed, 22 Jun 2011 02:05:26 -0000\r
+\r
+This is an OpenPGP/MIME signed message (RFC 2440 and 3156)\r
+--------------enig8A5960AA5BA1FD58935161A0\r
+Content-Type: text/plain; charset=UTF-8\r
+Content-Transfer-Encoding: quoted-printable\r
+\r
+On 06/21/2011 09:08 PM, david@tethera.net wrote:\r
+> Here is my proposal, based on Clint's suggestion on IRC, and on the\r
+> sed hack from librhash, to hide all symbols that are not explicitly\r
+> part of the notmuch API. In particular it hides the various symbols\r
+> related to Xapian exceptions.\r
+\r
+I like this proposal -- i would be really glad to not see the mangled\r
+Xapian symbols in libnotmuch.so.\r
+\r
+However, i'm concerned that the act of hiding these symbols will make it\r
+so that any program that tries to link both libnotmuch and libxapian\r
+will be unable to use these symbols.\r
+\r
+Consider the visiblity rules [0]:\r
+\r
+>> Symbol visibility is "default" by default but if the linker encounters=\r
+=20\r
+>> just one definition with it hidden - just one - that typeinfo symbol=20\r
+>> becomes permanently hidden (remember the C++ standard's ODR - one=20\r
+>> definition rule).=20\r
+\r
+\r
+This makes me think that a program that links against libnotmuch and\r
+libxapian, but actually tries to *use* libxapian's exception handling\r
+may have a problem.\r
+\r
+This is probably best resolved by writing such an executable and seeing\r
+if it behaves, but alas, i haven't done that work.   Any takers?\r
+Perhaps this could be a test in the notmuch test suite?\r
+\r
+       --dkg\r
+\r
+\r
+[0]\r
+http://gcc.gnu.org/wiki/Visibility#Problems_with_C.2B-.2B-_exceptions_.28=\r
+please_read.21.29\r
+\r
+\r
+\r
+--------------enig8A5960AA5BA1FD58935161A0\r
+Content-Type: application/pgp-signature; name="signature.asc"\r
+Content-Description: OpenPGP digital signature\r
+Content-Disposition: attachment; filename="signature.asc"\r
+\r
+-----BEGIN PGP SIGNATURE-----\r
+Version: GnuPG v1.4.11 (GNU/Linux)\r
+Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/\r
+\r
+iQJ8BAEBCgBmBQJOAU3bXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w\r
+ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQwRUU1QkU5NzkyODJEODBCOUY3NTQwRjFD\r
+Q0QyRUQ5NEQyMTczOUU5AAoJEMzS7ZTSFznp7rYQAKM+VE48bjNLEGv6VYQ9sCdq\r
+79DzrgKAYoBkE5sLHGGkowY85wHF35kMgFwPFjeu7JFagMZ8VI2VOg8f1Qp66SDW\r
+5crlotun9WtB0yBqRTc1BBIpZdqNdye8dYd1sICJoVy0onzJWC7nyv04bfmi+QSr\r
+9dWqtu/ixaHPxO6X2paZIxzqFZBck8Qe/olIYHNOjjoyEG6zyg6gr5pYbqW9dLvp\r
+5bKm49/zlI4JRjP+iRXO0QseL/CTQ1Vus41KGux/FeteQEHtQyIjQfJ4yBAdH2At\r
+mfOIXW39niUcVuIdgkfbnLtwdUsi9k9Ffu3/HBGRkURfkZ3StEG7X9Fueza6bJlW\r
+NAPiKaRNqK02Strrb4HunYSYv8FQzzt6DacSAJ9n+/sbLDTVRr5NMdoSKJJc8Fsn\r
+84HVaRWHSlGSMJrWO1ixE79yXWklovFlu7nY5LxdnXsl8TTUVDs8SzqWDsu0d2A/\r
+N0o1fMLqE3GXngjMr++C8z2Tg6JyZADTzxnxChd2wsxUV9mBQNHhwIdvleDKfEMQ\r
+nCA7608lSS/pWwuKCxV1bJ3ppatd7UMfCov+NKjMOtXDd7+p6jSIwiHm4MDR4RUM\r
+hy5qD3I24UM2CK6RTfB4FmoxVbcpDCqSD1cFwRdoEQl9yUo6snmh3r/1V8HIahgh\r
+wXeCzE5r/C4Q7rSeujgv\r
+=0rGx\r
+-----END PGP SIGNATURE-----\r
+\r
+--------------enig8A5960AA5BA1FD58935161A0--\r