Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp772805ybc; Sat, 23 Nov 2019 08:06:30 -0800 (PST) X-Google-Smtp-Source: APXvYqwiafR60jpINJo+JjkIWjWd5dJTaIwCfYDztkNUqtwCW19UbeGlJ617GRRMxnD1zEl/BqHf X-Received: by 2002:aa7:c303:: with SMTP id l3mr7662745edq.89.1574525190734; Sat, 23 Nov 2019 08:06:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574525190; cv=none; d=google.com; s=arc-20160816; b=a2lXQk/Fy+dzwUQAvZZoJdMsmq4XGXNrjYz1zHy3EzXFLaKVm8ZXDppE6GDVhUu2XX 9fdvudyXfjo5jAJtqM6lG7+0Qvb1YbCH3+FbDrRDB7P8RwzddNQJsEWYht07ugsl9eIs RCoQx25Ie6LtFENg7PxctHBRlg3mMUaVNS1/CG1iCYGy+vPtsvyALpGUEccVg9zdfIcZ EvQscSEEv1+kc749ab6uDlDPSX62oy0Si1aNh/SjTmS584mDmJw+vq6mqCt3rJTtsYa8 ofsgN5qAEQqo3LmO9rjdc9/LSKXQwQK/u2hmmA6CSvycgZAB89PKHw3ZTtoSEGLXo+1B EA5w== 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=MJZKY+LNnUcmoA8/8v1d9mnVbNRYD0Hp8Ly2ZpnRV9k=; b=BZMbPZUagJS+Bd02Vg2xDthOTkf1d0u0QI8UMJxkAwIgDkCRgrqPOygd1RgQneKDHj YG1z5fs721MIcBWVMHwM6OT0A0sXaZGZP/EWSkCbxRn/andji6klbkbDU6vtd9qeb43m x+v25f/RswcWy8q9/cdA1FGXWMfw9IQd2U6Apbm0erbrv83q1LGMBMFebRpEfqlVf0us baqsfKVNFIf/rebU+XcsAutDn9ifZOfJxhzmIt4zuH/xaqLI9YXKbqgz576otfKR82vv k5i0a/DJH+YS4oHdPDKNd2ekitgaOz6Wrfe8AMFvz3qqVai7ozlyTCV2/XwidA+kNZ/a MPRQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=mGJ7eDDU; 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 j5si1200257edc.195.2019.11.23.08.06.05; Sat, 23 Nov 2019 08:06:30 -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=mGJ7eDDU; 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 S1726939AbfKWQFF (ORCPT + 99 others); Sat, 23 Nov 2019 11:05:05 -0500 Received: from conuserg-12.nifty.com ([210.131.2.79]:49492 "EHLO conuserg-12.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726846AbfKWQFD (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 xANG4l5U019106; Sun, 24 Nov 2019 01:04:54 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-12.nifty.com xANG4l5U019106 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1574525094; bh=MJZKY+LNnUcmoA8/8v1d9mnVbNRYD0Hp8Ly2ZpnRV9k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mGJ7eDDUJ/MkRY2+xwDSNHG2eQ/ZOUJh1wAD4uYUzIFhkEL1Fi2xbIM89oOVsxwdq W7T1Juhy8d4BtYO/g5ddpCysacO26UjhC+v8Tfiy2hEImld0TIcXr5+QCXCQ5gdUUJ HEbqQn5oBTmDTcu6GXWkUZnnByLyOiaf1D6DgM3dJRLUCwF0zQMOFFeSndgeKMQZWo eUzt+b/HyLocv9oHq9pGQirNI0Q4EHa7CFjWdfRAY+N2Cp3crUueTxTOTNgnPyI1Gj ttRHmaaCJCwaLVZu5OyaT9oWBw1zLPUjhekwSw62QSKjD2adzaJlb506hl7RsU+hRV 5APOT1SbSb0AQ== 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 13/16] scripts/kallsyms: move ignored symbol types to is_ignored_symbol() Date: Sun, 24 Nov 2019 01:04:41 +0900 Message-Id: <20191123160444.11251-14-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 Collect the ignored patterns to is_ignored_symbol(). Signed-off-by: Masahiro Yamada --- Changes in v2: None scripts/kallsyms.c | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/scripts/kallsyms.c b/scripts/kallsyms.c index 04a1dd16edcf..d90a6133d7b8 100644 --- a/scripts/kallsyms.c +++ b/scripts/kallsyms.c @@ -137,6 +137,21 @@ static bool is_ignored_symbol(const char *name, char type) return true; } + if (type == 'U' || type == 'u') + return true; + /* exclude debugging symbols */ + if (type == 'N' || type == 'n') + return true; + + if (toupper(type) == 'A') { + /* Keep these useful absolute symbols */ + if (strcmp(name, "__kernel_syscall_via_break") && + strcmp(name, "__kernel_syscall_via_epc") && + strcmp(name, "__kernel_sigtramp") && + strcmp(name, "__gp")) + return true; + } + return false; } @@ -188,21 +203,6 @@ static int read_symbol(FILE *in, struct sym_entry *s) else if (check_symbol_range(sym, s->addr, text_ranges, ARRAY_SIZE(text_ranges)) == 0) /* nothing to do */; - else if (toupper(stype) == 'A') - { - /* Keep these useful absolute symbols */ - if (strcmp(sym, "__kernel_syscall_via_break") && - strcmp(sym, "__kernel_syscall_via_epc") && - strcmp(sym, "__kernel_sigtramp") && - strcmp(sym, "__gp")) - return -1; - - } - else if (toupper(stype) == 'U') - return -1; - /* exclude debugging symbols */ - else if (stype == 'N' || stype == 'n') - return -1; /* include the type field in the symbol name, so that it gets * compressed together */ -- 2.17.1