From patchwork Sat Nov 23 16:04:40 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 180111 Delivered-To: patch@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp886658ilf; Sat, 23 Nov 2019 08:05:35 -0800 (PST) X-Google-Smtp-Source: APXvYqzjp83hSbi1qevT+GNPUPgyA1iJnCQuuBr2YD9XbPacA4+1HYx/7LCgWIMvsqYCI8GWI4Xn X-Received: by 2002:a50:e68c:: with SMTP id z12mr8082612edm.53.1574525135323; Sat, 23 Nov 2019 08:05:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574525135; cv=none; d=google.com; s=arc-20160816; b=XttnzvnTHH0Ck2oHIS+hoOSY9Uk/hZ3+phGiHvdnlcvn5ownHJueDPkWdCGJ7EYW5A Qh52CcrxJZ7/oleQOsPhq2toNwM6pjc/NJPDHnFFntr/e4XZJBHKgnTla7IveCDykZ5/ Tc+Ikil1p0zEg8qIvOd0R4OiQSlMKulVqkRzmhZA3187BinTuEJgvkL99/cVbCgFk1cE VuyZm78OvUY7yuqVbUXEb/zzlUhlkTFNQEi7T822xYY8Ks8uQoAtZ7kp+ULkDvyYJfWb Z7FCHT3DFrTNzuy+NhXT/iqjn6bC+piblUynLzLZvpfjvhYmser9TXc5sxtLVsVWK2k1 bvAg== 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=9iKDRL9d6hTzpOpmUOinbE+RaKJ+14kZ7Ic+FqY8y+Y=; b=hq2e/XMXwzZUrJG3FuN5YPMc0GcR335bug0zk/3vBNz7pmcpFtxJAW5ubBwrew7Yiz TACWscKJ9wFOPPH1Y5AmOLimEM7JrtIJxQS7VgPXyzu50uStBmuRkSkelefyYOnTODKt WW6WILy5zhIZ+sS/lIbHH6Uz2H9NcHFlHwrFnl51ny2MAeT7lg6ct0zbfaJsep+bnNOf A6ttVMacNoUHiRT4zhPqgSF9Kbe7r2QvgUIx+uaQU3Y5EpciQxTA3D1f1JpAR4WM1yKn PJJFrDF4UhRHqkr65XVxzkhTjOH+V7+yVaPMwgVdt80tnhTzoJycyusMXfYhjMx5WJvs LOYQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=KFpeQPl7; 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 a2si999308ejb.257.2019.11.23.08.05.35; Sat, 23 Nov 2019 08:05:35 -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=KFpeQPl7; 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 S1727173AbfKWQFd (ORCPT + 26 others); Sat, 23 Nov 2019 11:05:33 -0500 Received: from conuserg-12.nifty.com ([210.131.2.79]:49456 "EHLO conuserg-12.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726774AbfKWQFC (ORCPT ); Sat, 23 Nov 2019 11:05:02 -0500 Received: from grover.flets-west.jp (softbank126093102113.bbtec.net [126.93.102.113]) (authenticated) by conuserg-12.nifty.com with ESMTP id xANG4l5T019106; Sun, 24 Nov 2019 01:04:53 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-12.nifty.com xANG4l5T019106 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1574525093; bh=9iKDRL9d6hTzpOpmUOinbE+RaKJ+14kZ7Ic+FqY8y+Y=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KFpeQPl7WSOVE5M+4JYWJ8DMYIoVWCT9dijqhBO0BSP29OO5sbiSI38pWWHLPvQsR 3P2tCKW9H7g5pB3N1UJXUEJTKd77GHg0d+36p4dO0Sy1++uNzc32sO2iMtc/hUE5dX U3Slqh0jkDfZUIZqhHaTMgOv+AawhekGBWj4+qJHz5LSRhrlrcp/AKa9i6DPxm8Fh0 FqxhmXd46eEK7LPhlTg38Tbh7TIYT+U69UZchvJz/Uy0IQ1T9Xj/1NleQbNrneYbBM t76u28L7Rz6MhKlUlcFoIjeHeTGRSsyYwOREi1teDNknwm2oBNv/iczAabOK8Hnup5 Y5V1zze2RuJnw== 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 12/16] scripts/kallsyms: move more patterns to the ignored_prefixes array Date: Sun, 24 Nov 2019 01:04:40 +0900 Message-Id: <20191123160444.11251-13-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 Refactoring for shortening the code. Signed-off-by: Masahiro Yamada --- Changes in v2: None scripts/kallsyms.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) -- 2.17.1 diff --git a/scripts/kallsyms.c b/scripts/kallsyms.c index 843615c1d384..04a1dd16edcf 100644 --- a/scripts/kallsyms.c +++ b/scripts/kallsyms.c @@ -105,6 +105,8 @@ static bool is_ignored_symbol(const char *name, char type) }; static const char * const ignored_prefixes[] = { + "$", /* local symbols for ARM, MIPS, etc. */ + ".LASANPC", /* s390 kasan local symbols */ "__crc_", /* modversions */ "__efistub_", /* arm64 EFI stub namespace */ NULL @@ -198,19 +200,9 @@ static int read_symbol(FILE *in, struct sym_entry *s) } else if (toupper(stype) == 'U') return -1; - /* - * 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 */ else if (stype == 'N' || stype == 'n') return -1; - /* exclude s390 kasan local symbols */ - else if (!strncmp(sym, ".LASANPC", 8)) - return -1; /* include the type field in the symbol name, so that it gets * compressed together */