[PATCH 5/5] T360-symbol-hiding: Use nm instead of objdump.
authorCharles Celerier <cceleri@cs.stanford.edu>
Tue, 6 May 2014 17:02:28 +0000 (13:02 +2000)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 18:02:14 +0000 (10:02 -0800)
fa/a0dc537a5eae9385fadf78c5637a80f5b4998e [new file with mode: 0644]

diff --git a/fa/a0dc537a5eae9385fadf78c5637a80f5b4998e b/fa/a0dc537a5eae9385fadf78c5637a80f5b4998e
new file mode 100644 (file)
index 0000000..41294b3
--- /dev/null
@@ -0,0 +1,91 @@
+Return-Path: <cceleri@cs.stanford.edu>\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 0FA01429E42\r
+       for <notmuch@notmuchmail.org>; Tue,  6 May 2014 10:03:12 -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\r
+       tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001]\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 jEkQobUHNWlr for <notmuch@notmuchmail.org>;\r
+       Tue,  6 May 2014 10:03:06 -0700 (PDT)\r
+Received: from qmta04.westchester.pa.mail.comcast.net\r
+       (qmta04.westchester.pa.mail.comcast.net [76.96.62.40])\r
+       by olra.theworths.org (Postfix) with ESMTP id BFCC1431E82\r
+       for <notmuch@notmuchmail.org>; Tue,  6 May 2014 10:02:57 -0700 (PDT)\r
+Received: from omta23.westchester.pa.mail.comcast.net ([76.96.62.74])\r
+       by qmta04.westchester.pa.mail.comcast.net with comcast\r
+       id ygU91n0021c6gX854h2xld; Tue, 06 May 2014 17:02:57 +0000\r
+Received: from jane.lan ([24.11.133.78])\r
+       by omta23.westchester.pa.mail.comcast.net with comcast\r
+       id yh2W1n00e1heoKc3jh2x3f; Tue, 06 May 2014 17:02:57 +0000\r
+From: Charles Celerier <cceleri@cs.stanford.edu>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH 5/5] T360-symbol-hiding: Use nm instead of objdump.\r
+Date: Tue,  6 May 2014 13:02:28 -0400\r
+Message-Id: <1399395748-44920-6-git-send-email-cceleri@cs.stanford.edu>\r
+X-Mailer: git-send-email 1.8.5.2 (Apple Git-48)\r
+In-Reply-To: <1399395748-44920-5-git-send-email-cceleri@cs.stanford.edu>\r
+References: <1399395748-44920-1-git-send-email-cceleri@cs.stanford.edu>\r
+       <1399395748-44920-2-git-send-email-cceleri@cs.stanford.edu>\r
+       <1399395748-44920-3-git-send-email-cceleri@cs.stanford.edu>\r
+       <1399395748-44920-4-git-send-email-cceleri@cs.stanford.edu>\r
+       <1399395748-44920-5-git-send-email-cceleri@cs.stanford.edu>\r
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net;\r
+       s=q20140121; t=1399395777;\r
+       bh=yJbNsjwWzC7vT2qJT/cWkN+KTrDnMHjiGpqyysP9yJE=;\r
+       h=Received:Received:From:To:Subject:Date:Message-Id;\r
+       b=kc4IkTap5BQCBgYTzE3eZAC0Fwg7QOQrl7l2dDv4ayEHPWobPOk3UWky05Xq9BK1R\r
+       25fdrMfB8/xC3dn4N9mWYl3lpJg/Z21n4E/0CfIrlrIBHsi88pGAiveIm6pLsGufcj\r
+       T1SOTgRv8Q9QEQzuUXXEtSYGheA80Dkr0N5uIDzWtBAG85amAi0lJ4vyGXCO1oLbdr\r
+       HJ6F6nv31w8LYMFJFXM1CSUqTQ7/n68yml7wkb41FttCVPLmFP9O6jhvIOEdrs4oNI\r
+       +3Fn4vRePIOiNsiuwXl8SR/Io0EqopeLUIZwWSARQyEHe/HUpQipSlfqkTAjnC3HSF\r
+       14B0SWdr/e8sw==\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\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: Tue, 06 May 2014 17:03:12 -0000\r
+\r
+The output of `objdump -t` depends on the format of the object files\r
+which are different across platforms (e.g. Mac OS X). Since we really\r
+just want to filter the symbols in the object file, nm is a more\r
+appropriate tool since it only lists symbols from object files (nm(1))\r
+and has a consistent output format.\r
+\r
+Signed-off-by: Charles Celerier <cceleri@cs.stanford.edu>\r
+---\r
+ test/T360-symbol-hiding.sh | 3 ++-\r
+ 1 file changed, 2 insertions(+), 1 deletion(-)\r
+\r
+diff --git a/test/T360-symbol-hiding.sh b/test/T360-symbol-hiding.sh\r
+index 97c734a..c5bbf27 100755\r
+--- a/test/T360-symbol-hiding.sh\r
++++ b/test/T360-symbol-hiding.sh\r
+@@ -33,7 +33,8 @@ test_begin_subtest 'checking output'\r
+ test_expect_equal "$result" "$output"\r
\r
+ test_begin_subtest 'comparing existing to exported symbols'\r
+-objdump -t $TEST_DIRECTORY/../lib/*.o | awk '$4 == ".text" && $6 ~ "^notmuch" {print $6}' | sort | uniq > ACTUAL\r
++\r
++nm -g $TEST_DIRECTORY/../lib/*.o | sed -n 's/.*\s\+T\s\+_\(notmuch_.*\)/\1/p' | sort | uniq > ACTUAL\r
+ sed -n 's/[[:blank:]]*\(notmuch_[^;]*\);/\1/p' $TEST_DIRECTORY/../notmuch.sym | sort | uniq > EXPORTED\r
+ test_expect_equal_file EXPORTED ACTUAL\r
\r
+-- \r
+1.8.5.2 (Apple Git-48)\r
+\r