From patchwork Sat Nov 23 13:27:15 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 180094 Delivered-To: patch@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp736228ilf; Sat, 23 Nov 2019 05:28:40 -0800 (PST) X-Google-Smtp-Source: APXvYqydCTN8spS7Y6SoHz3aKogGNrXx70fcTuZvXGvYwO+fI7t8VR1qfBv58CrTGqtsSGyoelsF X-Received: by 2002:a50:9353:: with SMTP id n19mr7172044eda.258.1574515720702; Sat, 23 Nov 2019 05:28:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574515720; cv=none; d=google.com; s=arc-20160816; b=Hd84fRppkN3OromHscm0eU1ujuneOIEgWT79atuLZmUypQCqw6QwRjWzsXzbDfKEVU aJGf1pTKcMMZgstJBLn+A4+YxmepCqulJuPOkSBZGqmmU3Nh2olObi20Chtu1YvbOcMc g78F+vbZ3ly3xYgmUuWkpP+0X5qVFNcQqun6xN8tvWXuSB+uEjnxwa6F4Sy4Kg00weog qZBhEOjoA0Q8++Oi1fwnKEQhg+aLIXjY5WVmtOcYLP4MrVZknN4XAfkjK3IHN2IapSu7 ytHoiwzP8zYcyiSKXwAkPu2s2hnjo2Hac/9BfWTBR61prXkqWnN1MS/LZITUIEdijou9 U51g== 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=TgBBfAjF1gkWIAkBRfUA0hcVefTdXQgpgZ7bt3b2OO4=; b=BtuqYJS91oMaeIpO4TSrUqUgjReQbz9QtNuUOYa7QL8FLffef4j0hCvhDotG5Gv3Co k3d5Lk/INWhNAgGSCEltU8YQhmk7CAu7Q50Za5QtIb1XacC03ZSx0IP3RByyu8NUyFpN vw6T+pC8jbxYBpvDAz+g7bwl0Sav8Xmw1XsvP+RwZsfu6cEAZ5NwIssFZAO/DCQrxWfu OCZR/oMMk3SGM6UlVf8vwWb4XHYoCHzsHiMeYpOHQ1tvEY89NaHSIKhQ4I5Tl7Jttodh QZ4v/GHrBCO8BAivK2NhD5hLSNk/HoV7GwHvE+5nOr1edrNTEGT/Hkv9C+O2HifoJq91 xk7g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=H7Kordq0; 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 e25si885768ede.335.2019.11.23.05.28.40; Sat, 23 Nov 2019 05:28:40 -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=H7Kordq0; 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 S1727186AbfKWN2i (ORCPT + 26 others); Sat, 23 Nov 2019 08:28:38 -0500 Received: from conuserg-10.nifty.com ([210.131.2.77]:39539 "EHLO conuserg-10.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726759AbfKWN2A (ORCPT ); Sat, 23 Nov 2019 08:28:00 -0500 Received: from grover.flets-west.jp (softbank126093102113.bbtec.net [126.93.102.113]) (authenticated) by conuserg-10.nifty.com with ESMTP id xANDRbkd000733; Sat, 23 Nov 2019 22:27:40 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-10.nifty.com xANDRbkd000733 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1574515660; bh=TgBBfAjF1gkWIAkBRfUA0hcVefTdXQgpgZ7bt3b2OO4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=H7Kordq0Z3UH2HxIwpMry7Xy/ka2OwWKrm8/MbDl8o+VMj6UepLQG0Im0Ge2986cn LdjrPJvM9rw/X9NGSQXcA2zWxw5MlkTQhdSycp26sGeihRfHY/9nPY18veRTm50Tk6 uxP2eEJt9NInF+3HypKPbS8G1xTByQBIOM7ZIdenaLjWmyaKdgXNFbmXikWE2u40JF uCGpo+RyQyfZ5yhhtfxj5W2XwztuW5wDUPlGUeFq5zzPsEHBfLTAfsJrBvYmEIr3WO /n+0ONRE+pJiO2Su9xcXjlYRUEFd8r9t/E+7NcovY0LeHx9nLYwUbw3THUEbKkk/r8 eh+CNe5vWBn4g== 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 04/16] scripts/kallsyms: remove redundant is_arm_mapping_symbol() Date: Sat, 23 Nov 2019 22:27:15 +0900 Message-Id: <20191123132727.30151-5-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191123132727.30151-1-yamada.masahiro@socionext.com> References: <20191123132727.30151-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 --- 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 0959e1de381c..265475d3cffb 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 */