All of lore.kernel.org
 help / color / mirror / Atom feed
From: Masahiro Yamada <yamada.masahiro@socionext.com>
To: linux-kbuild@vger.kernel.org
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>,
	linux-kernel@vger.kernel.org
Subject: [PATCH 11/16] scripts/kallsyms: move more patterns to the ignored_prefixes array
Date: Sat, 23 Nov 2019 22:27:22 +0900	[thread overview]
Message-ID: <20191123132727.30151-12-yamada.masahiro@socionext.com> (raw)
In-Reply-To: <20191123132727.30151-1-yamada.masahiro@socionext.com>

Refactoring for shortening the code.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---

 scripts/kallsyms.c | 12 ++----------
 1 file changed, 2 insertions(+), 10 deletions(-)

diff --git a/scripts/kallsyms.c b/scripts/kallsyms.c
index 5553843631d4..63473924d4de 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 */
-- 
2.17.1


  parent reply	other threads:[~2019-11-23 13:28 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-23 13:27 [PATCH 00/16] scripts/kallsyms: various cleanups and optimizations Masahiro Yamada
2019-11-23 13:27 ` [PATCH 01/16] scripts/kallsyms: remove unneeded #ifndef ARRAY_SIZE Masahiro Yamada
2019-11-23 13:27 ` [PATCH 02/16] scripts/kallsyms: fix definitely-lost memory leak Masahiro Yamada
2019-11-23 13:27 ` [PATCH 03/16] scripts/kallsyms: set relative_base more effectively Masahiro Yamada
2019-11-23 13:27 ` [PATCH 04/16] scripts/kallsyms: remove redundant is_arm_mapping_symbol() Masahiro Yamada
2019-11-23 13:27 ` [PATCH 05/16] scripts/kallsyms: remove unneeded length check for prefix matching Masahiro Yamada
2019-11-23 13:27 ` [PATCH 06/16] scripts/kallsyms: add sym_name() to mitigate cast ugliness Masahiro Yamada
2019-11-23 13:27 ` [PATCH 07/16] scripts/kallsyms: replace prefix_underscores_count() with strspn() Masahiro Yamada
2019-11-23 13:27 ` [PATCH 08/16] scripts/kallsyms: make find_token() return (unsigned char *) Masahiro Yamada
2019-11-23 13:27 ` [PATCH 09/16] scripts/kallsyms: add const qualifiers where possible Masahiro Yamada
2019-11-23 13:27 ` [PATCH 10/16] scripts/kallsyms: skip ignored symbols very early Masahiro Yamada
2019-11-23 13:27 ` Masahiro Yamada [this message]
2019-11-23 13:27 ` [PATCH 12/16] scripts/kallsyms: move ignored symbol types to is_ignored_symbol() Masahiro Yamada
2019-11-23 13:27 ` [PATCH 13/16] scripts/kallsyms: make check_symbol_range() void function Masahiro Yamada
2019-11-23 13:27 ` [PATCH 14/16] scripts/kallsyms: check no valid symbol earlier Masahiro Yamada
2019-11-23 13:27 ` [PATCH 15/16] scripts/kallsyms: put check_symbol_range() calls close together Masahiro Yamada
2019-11-23 13:27 ` [PATCH 16/16] scripts/kallsyms: remove redundant initializers Masahiro Yamada

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191123132727.30151-12-yamada.masahiro@socionext.com \
    --to=yamada.masahiro@socionext.com \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.