From: David Bremner Date: Sat, 12 Jul 2014 19:00:14 +0000 (+2100) Subject: Re: [PATCH v2 5/5] T360-symbol-hiding: Use nm instead of objdump. X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=69c52938a716e68a19d2e392d13ae0f90621725e;p=notmuch-archives.git Re: [PATCH v2 5/5] T360-symbol-hiding: Use nm instead of objdump. --- diff --git a/67/412b2d05ae51a8d983578c57d15eceefd0cd4f b/67/412b2d05ae51a8d983578c57d15eceefd0cd4f new file mode 100644 index 000000000..2b2be50dc --- /dev/null +++ b/67/412b2d05ae51a8d983578c57d15eceefd0cd4f @@ -0,0 +1,85 @@ +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 13AB6431FBD + for ; Sat, 12 Jul 2014 12:00:30 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: 0 +X-Spam-Level: +X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none] + 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 F16+yIuCMtaK for ; + Sat, 12 Jul 2014 12:00:26 -0700 (PDT) +Received: from yantan.tethera.net (yantan.tethera.net [199.188.72.155]) + (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id 5207A431FBC + for ; Sat, 12 Jul 2014 12:00:26 -0700 (PDT) +Received: from remotemail by yantan.tethera.net with local (Exim 4.80) + (envelope-from ) + id 1X62Ww-0003Ou-4I; Sat, 12 Jul 2014 16:00:18 -0300 +Received: (nullmailer pid 20776 invoked by uid 1000); Sat, 12 Jul 2014 + 19:00:14 -0000 +From: David Bremner +To: Charles Celerier , Notmuch Mail + +Subject: Re: [PATCH v2 5/5] T360-symbol-hiding: Use nm instead of objdump. +In-Reply-To: +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> + <87a9arvs9b.fsf@maritornes.cs.unb.ca> + <87lhua3qvv.fsf@maritornes.cs.unb.ca> +User-Agent: Notmuch/0.18.1+22~gbf82697 (http://notmuchmail.org) Emacs/24.3.1 + (x86_64-pc-linux-gnu) +Date: Sat, 12 Jul 2014 16:00:14 -0300 +Message-ID: <87d2dav1vl.fsf@maritornes.cs.unb.ca> +MIME-Version: 1.0 +Content-Type: text/plain +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: Sat, 12 Jul 2014 19:00:30 -0000 + +Charles Celerier writes: + +> David Bremner writes: +> +> $ objdump -t lib/*.o | sed -n '/\[\.text\] __\?notmuch/p' | tail +> 00000000000009a0 g 0f SECT 01 0000 [.text] _notmuch_thread_get_authors +> 0000000000000990 g 0f SECT 01 0000 [.text] _notmuch_thread_get_matched_messages +> 0000000000000960 g 0f SECT 01 0000 [.text] _notmuch_thread_get_messages +> 00000000000009d0 g 0f SECT 01 0000 [.text] _notmuch_thread_get_newest_date + +Here is some equivalent output from Linux + +$ objdump -t lib/*.o | sed -n '/[.]text.*notmuch/p' | tail -12 + +0000000000000150 g F .text 000000000000095e .hidden _notmuch_thread_create +0000000000000ab0 g F .text 0000000000000009 notmuch_thread_get_toplevel_messages +0000000000000ac0 g F .text 0000000000000009 notmuch_thread_get_messages + +... + +Notice in particular the ".hidden" in the first line. Also, the lack of +extra _ on the front. + +It may be that the visibility information is not accessible on OS-X +using objdump; this is something different than whether a symbol is +extern. The symbols marked .hidden can be used across compilation unit +boundaries, but will not be exported from the shared library. +