From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19969 invoked by alias); 1 May 2017 22:44:47 -0000 Mailing-List: contact binutils-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sourceware.org Received: (qmail 19950 invoked by uid 89); 1 May 2017 22:44:47 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-25.9 required=5.0 tests=BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,KAM_LAZY_DOMAIN_SECURITY,NO_DNS_FOR_FROM,RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy= X-HELO: mga06.intel.com Received: from mga06.intel.com (HELO mga06.intel.com) (134.134.136.31) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 01 May 2017 22:44:46 +0000 Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga104.jf.intel.com with ESMTP; 01 May 2017 15:44:46 -0700 X-ExtLoop1: 1 Received: from gnu-6.sc.intel.com ([172.25.70.218]) by orsmga005.jf.intel.com with ESMTP; 01 May 2017 15:44:46 -0700 Received: by gnu-6.sc.intel.com (Postfix, from userid 1000) id 9698C2001B3; Mon, 1 May 2017 15:44:46 -0700 (PDT) Date: Mon, 01 May 2017 22:44:00 -0000 From: "H.J. Lu" To: binutils@sourceware.org Subject: [PATCH] PR gold/21129: gold: Check if _ZN1AD2Ev/_ZN1AC2Ev exist first Message-ID: <20170501224446.GA17463@intel.com> Reply-To: "H.J. Lu" MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.8.0 (2017-02-23) X-SW-Source: 2017-05/txt/msg00012.txt.bz2 Since GCC 4.2 doesn't generate _ZN1AD2Ev nor _ZN1AC2Ev, check if they are folded only when they exist. OK for master? H.J. --- PR gold/21129 * testsuite/icf_safe_pie_test.sh: Don't check if _ZN1AD2Ev and _ZN1AC2Ev are folded when they don't exist. --- gold/testsuite/icf_safe_pie_test.sh | 5 ++++- gold/testsuite/icf_safe_test.sh | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/gold/testsuite/icf_safe_pie_test.sh b/gold/testsuite/icf_safe_pie_test.sh index f91a80c..da726da 100755 --- a/gold/testsuite/icf_safe_pie_test.sh +++ b/gold/testsuite/icf_safe_pie_test.sh @@ -71,6 +71,9 @@ arch_specific_safe_fold() arch_specific_safe_fold icf_safe_pie_test_1.stdout icf_safe_pie_test_2.stdout \ icf_safe_pie_test.map "kept_func_1" "kept_func_2" -check_fold icf_safe_pie_test.map "_ZN1AD2Ev" "_ZN1AC2Ev" +if grep -q _ZN1A[CD]2Ev icf_safe_pie_test_1.stdout +then + check_fold icf_safe_pie_test.map "_ZN1AD2Ev" "_ZN1AC2Ev" +fi check_nofold icf_safe_pie_test_1.stdout "kept_func_3" "kept_func_1" check_nofold icf_safe_pie_test_1.stdout "kept_func_3" "kept_func_2" diff --git a/gold/testsuite/icf_safe_test.sh b/gold/testsuite/icf_safe_test.sh index f048d86..dae8582 100755 --- a/gold/testsuite/icf_safe_test.sh +++ b/gold/testsuite/icf_safe_test.sh @@ -69,6 +69,9 @@ arch_specific_safe_fold() arch_specific_safe_fold icf_safe_test_1.stdout icf_safe_test_2.stdout \ icf_safe_test.map "kept_func_1" "kept_func_2" -check_fold icf_safe_test.map "_ZN1AD2Ev" "_ZN1AC2Ev" +if grep -q _ZN1A[CD]2Ev icf_safe_test_1.stdout +then + check_fold icf_safe_test.map "_ZN1AD2Ev" "_ZN1AC2Ev" +fi check_nofold icf_safe_test_1.stdout "kept_func_3" "kept_func_1" check_nofold icf_safe_test_1.stdout "kept_func_3" "kept_func_2" -- 2.9.3