From patchwork Sat Nov 23 16:04:33 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 180105 Delivered-To: patch@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp886235ilf; Sat, 23 Nov 2019 08:05:16 -0800 (PST) X-Google-Smtp-Source: APXvYqyp/siQpYhHAprelFKodijncV/UazpL/P+znzTPPLXgtOf52BdQ48oc/12WiwnnjLph4q+V X-Received: by 2002:aa7:d147:: with SMTP id r7mr7948618edo.198.1574525116730; Sat, 23 Nov 2019 08:05:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574525116; cv=none; d=google.com; s=arc-20160816; b=dat4UbPVuRe0oKGt98QxCnJIMPUochi9bjwkrU02ABTkPCB1kE0khiR5XDNH8ITOb6 eQ/zU4yO3qSPh2SakoPOPkcEARf4gjQwUBMwhh4m10cU2wGPCCMCjpqhs7hnm0oheK5B kbgbBFpKW+nY83AVfy3wtVH27oBQFSJxYMAVZuT3FsyWPljC6h/TPG86rKEfZgf51DRc 5AUySntG0UmRaj29UmRhMT/Zsv3HAdMLNZYnmauN6bLmmuDUx6NFOXnBeYnDJoVVzMel lmram2GlMAaD3Gu1oEf8Ej1sPwZfjeUEQC819BBqMZGi/avPEnP7L7++VMkqRgFZf276 /LlQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:dkim-filter; bh=IIQsi1izm8K/GBPuGItQbp2rWTEbFo+vUJb/JZsPBDI=; b=m6uZrtH41dQpkwFwqvGOBsW84oSY7nkm1G6NimzBB/YSXfiC89Kr9Zgkk0bGYzl3x+ gsaipdzjbTPpjrPwtWrabQ9TsEvMXK0XxvMV7o7daGTSL0M0OqBcrjU0s1V9JiLEEj4o BcmtbD8yF8VjGKWR/Emt49T/pXTg1l42grdiaWjgSlyyDps0gxWJYYve+hO3z5dFVffu BahHEAUvMJFLowqg0boxfmGJjgCdnnAU2v+xKkITeqgnubo2RyJaUFl+dgSHACpszxv8 WHajvOaznJbqIb53GiEfXlqah81gMG3Iqyon54eadOzzBZ85e6Bkwdc2qacxpZRYwZe8 +u9g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=GbAAVpbg; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o12si942944ejb.296.2019.11.23.08.05.16; Sat, 23 Nov 2019 08:05:16 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=GbAAVpbg; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727059AbfKWQFJ (ORCPT + 26 others); Sat, 23 Nov 2019 11:05:09 -0500 Received: from conuserg-12.nifty.com ([210.131.2.79]:49493 "EHLO conuserg-12.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726842AbfKWQFD (ORCPT ); Sat, 23 Nov 2019 11:05:03 -0500 Received: from grover.flets-west.jp (softbank126093102113.bbtec.net [126.93.102.113]) (authenticated) by conuserg-12.nifty.com with ESMTP id xANG4l5M019106; Sun, 24 Nov 2019 01:04:50 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-12.nifty.com xANG4l5M019106 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1574525090; bh=IIQsi1izm8K/GBPuGItQbp2rWTEbFo+vUJb/JZsPBDI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GbAAVpbgjzpdtjqkO8wl3cJej1h/ITGS5yHcTf9awSi3XY26RsKP4Ki1jX1rnYzIB JH7UZ3e472ol+0QSqmBjgH/huyJdnyIPiByIYYeiIxQkWEEGrkiQ38gzRS35nc+UVy RALjM0UoNDh1KduT0bwIMM9ndb6vfMucqhI5QbIPA7RlZZVlZy8VxIdUOxPThnKYRv SVJ0Du52HgWW/ypuwRfhoBLbp71ZzmHo3Jox4VR/mez9NfogoksbeiE7PMYP4yq1oA 91XXY7FZ+1wVOhUreeYPH7vMkSo8M6ezucg8MS2KuM10OmvPvB2eEV4NXzpxBasSPT suh+56AJBy2xQ== X-Nifty-SrcIP: [126.93.102.113] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Masahiro Yamada , linux-kernel@vger.kernel.org Subject: [PATCH v2 05/16] scripts/kallsyms: remove redundant is_arm_mapping_symbol() Date: Sun, 24 Nov 2019 01:04:33 +0900 Message-Id: <20191123160444.11251-6-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191123160444.11251-1-yamada.masahiro@socionext.com> References: <20191123160444.11251-1-yamada.masahiro@socionext.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Since commit 6f00df24ee39 ("[PATCH] Strip local symbols from kallsyms"), all symbols starting '$' are ignored. is_arm_mapping_symbol() particularly ignores $a, $t, etc. but it is redundant. Signed-off-by: Masahiro Yamada --- Changes in v2: None scripts/kallsyms.c | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) -- 2.17.1 diff --git a/scripts/kallsyms.c b/scripts/kallsyms.c index c9efb67c6ecb..14a50c8d3f34 100644 --- a/scripts/kallsyms.c +++ b/scripts/kallsyms.c @@ -74,16 +74,6 @@ static void usage(void) exit(1); } -/* - * This ignores the intensely annoying "mapping symbols" found - * in ARM ELF files: $a, $t and $d. - */ -static int is_arm_mapping_symbol(const char *str) -{ - return str[0] == '$' && strchr("axtd", str[1]) - && (str[2] == '\0' || str[2] == '.'); -} - static int check_symbol_range(const char *sym, unsigned long long addr, struct addr_range *ranges, int entries) { @@ -139,10 +129,13 @@ static int read_symbol(FILE *in, struct sym_entry *s) return -1; } - else if (toupper(stype) == 'U' || - is_arm_mapping_symbol(sym)) + else if (toupper(stype) == 'U') return -1; - /* exclude also MIPS ELF local symbols ($L123 instead of .L123) */ + /* + * Ignore generated symbols such as: + * - mapping symbols in ARM ELF files ($a, $t, and $d) + * - MIPS ELF local symbols ($L123 instead of .L123) + */ else if (sym[0] == '$') return -1; /* exclude debugging symbols */