Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 1BD68431FBF for ; Thu, 8 May 2014 08:03:17 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -2.3 X-Spam-Level: X-Spam-Status: No, score=-2.3 tagged_above=-999 required=5 tests=[RCVD_IN_DNSWL_MED=-2.3] autolearn=disabled Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 5xsryG0rPHXZ for ; Thu, 8 May 2014 08:03:09 -0700 (PDT) Received: from smtp2.cs.Stanford.EDU (smtp2.cs.Stanford.EDU [171.64.64.26]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id AC414431FAE for ; Thu, 8 May 2014 08:03:09 -0700 (PDT) Received: from c-24-11-133-78.hsd1.sc.comcast.net ([24.11.133.78] helo=jane.lan) by smtp2.cs.Stanford.EDU with esmtpsa (UNKNOWN:AES128-GCM-SHA256:128) (Exim 4.80.1) (envelope-from ) id 1WiPql-0001Zl-QJ; Thu, 08 May 2014 08:03:08 -0700 From: Charles Celerier To: David Bremner , Notmuch Mail Subject: Re: [PATCH v2 5/5] T360-symbol-hiding: Use nm instead of objdump. In-Reply-To: <87d2fov2qj.fsf@maritornes.cs.unb.ca> References: <1399395748-44920-1-git-send-email-cceleri@cs.stanford.edu> <1399434615-28425-1-git-send-email-cceleri@cs.stanford.edu> <1399434615-28425-2-git-send-email-cceleri@cs.stanford.edu> <87d2fov2qj.fsf@maritornes.cs.unb.ca> User-Agent: Notmuch/0.18~rc0+32~gd5092c2 (http://notmuchmail.org) Emacs/24.3.1 (x86_64-apple-darwin13.1.0) Date: Thu, 08 May 2014 11:03:05 -0400 Message-ID: MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" X-Scan-Signature: 1d850ab87a3e5a2ab763966491000bbf X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 May 2014 15:03:17 -0000 --=-=-= Content-Type: text/plain David Bremner writes: > Charles Celerier writes: >> test_begin_subtest 'comparing existing to exported symbols' >> -objdump -t $TEST_DIRECTORY/../lib/*.o | awk '$4 == ".text" && $6 ~ "^notmuch" {print $6}' | sort | uniq > ACTUAL >> +nm -g $TEST_DIRECTORY/../lib/*.o | sed -n 's/.*\s\+T\s\+_\(notmuch_.*\)/\1/p' | sort | uniq > ACTUAL >> sed -n 's/[[:blank:]]*\(notmuch_[^;]*\);/\1/p' $TEST_DIRECTORY/../notmuch.sym | sort | uniq > EXPORTED > > Hmm. It seems like the _ there is wrong. It grabs all of the symbols > starting with _notmuch, which are symbols we _don't_ want exported. > It makes me wonder what ends up in "notmuch.sym" on MacOS, if that test > passes for you. Ok. Apologies in advance for the verbose content of this email. Here is my notmuch.sym: $ cat notmuch.sym { global: __ZTIN6Xapian10LogicErrorE; __ZTIN6Xapian12RuntimeErrorE; __ZTIN6Xapian16DocNotFoundErrorE; __ZTIN6Xapian20InvalidArgumentErrorE; __ZTIN6Xapian5ErrorE; __ZTSN6Xapian10LogicErrorE; __ZTSN6Xapian12RuntimeErrorE; __ZTSN6Xapian16DocNotFoundErrorE; __ZTSN6Xapian20InvalidArgumentErrorE; __ZTSN6Xapian5ErrorE; notmuch_status_to_string; notmuch_database_create; notmuch_database_open; notmuch_database_close; notmuch_database_compact; notmuch_database_destroy; notmuch_database_get_path; notmuch_database_get_version; notmuch_database_needs_upgrade; notmuch_database_upgrade; notmuch_database_begin_atomic; notmuch_database_end_atomic; notmuch_database_get_directory; notmuch_database_add_message; notmuch_database_remove_message; notmuch_database_find_message; notmuch_database_find_message_by_filename; notmuch_database_get_all_tags; notmuch_query_create; notmuch_query_get_query_string; notmuch_query_set_omit_excluded; notmuch_query_set_sort; notmuch_query_get_sort; notmuch_query_add_tag_exclude; notmuch_query_search_threads; notmuch_query_search_messages; notmuch_query_destroy; notmuch_threads_valid; notmuch_threads_get; notmuch_threads_move_to_next; notmuch_threads_destroy; notmuch_query_count_messages; notmuch_query_count_threads; notmuch_thread_get_thread_id; notmuch_thread_get_total_messages; notmuch_thread_get_toplevel_messages; notmuch_thread_get_messages; notmuch_thread_get_matched_messages; notmuch_thread_get_authors; notmuch_thread_get_subject; notmuch_thread_get_oldest_date; notmuch_thread_get_newest_date; notmuch_thread_get_tags; notmuch_thread_destroy; notmuch_messages_valid; notmuch_messages_get; notmuch_messages_move_to_next; notmuch_messages_destroy; notmuch_messages_collect_tags; notmuch_message_get_message_id; notmuch_message_get_thread_id; notmuch_message_get_replies; notmuch_message_get_filename; notmuch_message_get_filenames; notmuch_message_get_flag; notmuch_message_set_flag; notmuch_message_get_date; notmuch_message_get_header; notmuch_message_get_tags; notmuch_message_add_tag; notmuch_message_remove_tag; notmuch_message_remove_all_tags; notmuch_message_maildir_flags_to_tags; notmuch_message_tags_to_maildir_flags; notmuch_message_freeze; notmuch_message_thaw; notmuch_message_destroy; notmuch_tags_valid; notmuch_tags_get; notmuch_tags_move_to_next; notmuch_tags_destroy; notmuch_directory_set_mtime; notmuch_directory_get_mtime; notmuch_directory_get_child_files; notmuch_directory_get_child_directories; notmuch_directory_destroy; notmuch_filenames_valid; notmuch_filenames_get; notmuch_filenames_move_to_next; notmuch_filenames_destroy; local: *; }; The output of the test in question (T360-symbol-hiding) after applying all of the patches in this series is T360-symbol-hiding: Testing exception symbol hiding PASS running test PASS checking output FAIL comparing existing to exported symbols --- T360-symbol-hiding.3.EXPORTED 2014-05-08 14:48:52.000000000 +0000 +++ T360-symbol-hiding.3.ACTUAL 2014-05-08 14:48:52.000000000 +0000 @@ -26,7 +26,11 @@ notmuch_filenames_valid notmuch_message_add_tag notmuch_message_destroy +notmuch_message_file_close +notmuch_message_file_get_header +notmuch_message_file_open notmuch_message_freeze +notmuch_message_get_author notmuch_message_get_date notmuch_message_get_filename notmuch_message_get_filenames @@ -39,6 +43,7 @@ notmuch_message_maildir_flags_to_tags notmuch_message_remove_all_tags notmuch_message_remove_tag +notmuch_message_set_author notmuch_message_set_flag notmuch_message_tags_to_maildir_flags notmuch_message_thaw @@ -58,6 +63,8 @@ notmuch_query_search_threads notmuch_query_set_omit_excluded notmuch_query_set_sort +notmuch_sha1_of_file +notmuch_sha1_of_string notmuch_status_to_string notmuch_tags_destroy notmuch_tags_get This output was a clear motivation for the patch in id:1399402716-13714-1-git-send-email-cceleri@cs.stanford.edu. Here is some of output of the matches made on the output of nm: $ nm -g test/../lib/*.o | sed -n '/.*\s\+T\s\+_\(notmuch_.*\)/p' 00000000000028c0 T _notmuch_database_add_message 0000000000002280 T _notmuch_database_begin_atomic 0000000000001af0 T _notmuch_database_close 0000000000001de0 T _notmuch_database_compact 0000000000000300 T _notmuch_database_create 0000000000001db0 T _notmuch_database_destroy 0000000000002300 T _notmuch_database_end_atomic ... chuck --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.22 (Darwin) iQEcBAEBAgAGBQJTa5ypAAoJEOjk698fDjuARSgIAIPEtOaujQVdM7QeM3CEBCk4 xZpJ2macyLr6xR/b5PoE8fPiM48nortR33TJhU1+me9SEXBUSjR5qbZvUQfek5O9 dy2CKnVP+r9Iv0crfTMkK9Kklf56/9OSn8mFwVwe2hHwZcvkrqR/x46EYAntO0S7 g9Xg3E4MhH4/EvWdpLI4HOcnWbc4Srzhd07z+P8OgOoYXRQ63mYLJs90B0UqXtUd Z2OxNZb/eYKwXplkqV8hxM1927+ne1pfQx1RwkZ1fLXJDFrp4vTjW7F6ciDf40ly 0KAd5on/BSzYZsDamgFjzLjiZK7wGVo3Q/KO6ILeKLW3A942DEN5NnywgZqJD8A= =ErPe -----END PGP SIGNATURE----- --=-=-=--