From f5f802c57f4709be45999a1cb9bc06c7be995748 Mon Sep 17 00:00:00 2001 From: Charles Celerier Date: Wed, 7 May 2014 23:50:15 +2000 Subject: [PATCH] [PATCH v2 5/5] T360-symbol-hiding: Use nm instead of objdump. --- 4b/9b3925687eaecc4f008e57f2d28cfc6040a69b | 77 +++++++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 4b/9b3925687eaecc4f008e57f2d28cfc6040a69b diff --git a/4b/9b3925687eaecc4f008e57f2d28cfc6040a69b b/4b/9b3925687eaecc4f008e57f2d28cfc6040a69b new file mode 100644 index 000000000..f7f1b4b72 --- /dev/null +++ b/4b/9b3925687eaecc4f008e57f2d28cfc6040a69b @@ -0,0 +1,77 @@ +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 5B349431FBD + for ; Tue, 6 May 2014 20:50:35 -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 9WilArlDxeX3 for ; + Tue, 6 May 2014 20:50:28 -0700 (PDT) +Received: from smtp3.cs.Stanford.EDU (smtp3.cs.Stanford.EDU [171.64.64.27]) + (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id 7C7C8431FAF + for ; Tue, 6 May 2014 20:50:28 -0700 (PDT) +Received: from c-24-11-133-78.hsd1.sc.comcast.net ([24.11.133.78] + helo=jane.lan) + by smtp3.cs.Stanford.EDU with esmtpsa (TLSv1:DHE-RSA-SEED-SHA:128) + (Exim 4.80.1) (envelope-from ) + id 1WhssA-0000I5-Qj; Tue, 06 May 2014 20:50:23 -0700 +From: Charles Celerier +To: Notmuch Mail +Subject: [PATCH v2 5/5] T360-symbol-hiding: Use nm instead of objdump. +Date: Tue, 6 May 2014 23:50:15 -0400 +Message-Id: <1399434615-28425-2-git-send-email-cceleri@cs.stanford.edu> +X-Mailer: git-send-email 1.8.5.2 (Apple Git-48) +In-Reply-To: <1399434615-28425-1-git-send-email-cceleri@cs.stanford.edu> +References: <1399395748-44920-1-git-send-email-cceleri@cs.stanford.edu> + <1399434615-28425-1-git-send-email-cceleri@cs.stanford.edu> +X-Scan-Signature: 5e15904e367bf57319d290d73554c551 +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: Wed, 07 May 2014 03:50:35 -0000 + +The output of `objdump -t` depends on the format of the object files +which are different across platforms (e.g. Mac OS X). Since we really +just want to filter the symbols in the object file, nm is a more +appropriate tool since it only lists symbols from object files (nm(1)) +and has a consistent output format. + +Signed-off-by: Charles Celerier +--- + test/T360-symbol-hiding.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/test/T360-symbol-hiding.sh b/test/T360-symbol-hiding.sh +index 9239fc1..21cabca 100755 +--- a/test/T360-symbol-hiding.sh ++++ b/test/T360-symbol-hiding.sh +@@ -33,7 +33,7 @@ test_begin_subtest 'checking output' + test_expect_equal "$result" "$output" + + 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 + test_expect_equal_file EXPORTED ACTUAL + +-- +1.8.5.2 (Apple Git-48) + -- 2.26.2