From: Mathias Krause <minipli@googlemail.com>
To: Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>
Cc: Joe Perches <joe@perches.com>,
Rasmus Villemoes <linux@rasmusvillemoes.dk>,
Andrew Morton <akpm@linux-foundation.org>,
linux-kernel@vger.kernel.org,
Mathias Krause <minipli@googlemail.com>
Subject: [PATCH v2 8/8] kallsyms: exclude pseudo symbols for __init / __exit strings
Date: Sat, 12 Jul 2014 16:43:32 +0200 [thread overview]
Message-ID: <1405176212-12175-9-git-send-email-minipli@googlemail.com> (raw)
In-Reply-To: <1405176212-12175-1-git-send-email-minipli@googlemail.com>
The __init_str() / __exit_str() annotations create pseudo symbols.
Ignore them, they have no value for us.
Signed-off-by: Mathias Krause <minipli@googlemail.com>
---
scripts/kallsyms.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/scripts/kallsyms.c b/scripts/kallsyms.c
index dc7aa45e80..8fd0f2965d 100644
--- a/scripts/kallsyms.c
+++ b/scripts/kallsyms.c
@@ -88,6 +88,16 @@ static inline int is_arm_mapping_symbol(const char *str)
&& (str[2] == '\0' || str[2] == '.');
}
+/*
+ * This ignores the pseudo symbols for __init_str() / __exit_str() annotated
+ * strings.
+ */
+static inline int is_init_exit_str_symbol(const char *str)
+{
+ return strncmp(str, "__UNIQUE_ID__init_str_", 22) == 0 ||
+ strncmp(str, "__UNIQUE_ID__exit_str_", 22) == 0;
+}
+
static int check_symbol_range(const char *sym, unsigned long long addr,
struct addr_range *ranges, int entries)
{
@@ -158,6 +168,9 @@ static int read_symbol(FILE *in, struct sym_entry *s)
/* exclude debugging symbols */
else if (stype == 'N')
return -1;
+ /* exclude pseudo symbols for __init / __exit strings */
+ else if (stype == 't' && is_init_exit_str_symbol(sym))
+ return -1;
/* include the type field in the symbol name, so that it gets
* compressed together */
--
1.7.10.4
next prev parent reply other threads:[~2014-07-12 14:44 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-12 14:43 [PATCH v2 0/8] Mark literal strings in __init / __exit code Mathias Krause
2014-07-12 14:43 ` [PATCH v2 1/8] init.h: Add __init_str / __exit_str macros Mathias Krause
2014-07-12 14:43 ` [PATCH v2 2/8] printk: Provide pi_<level> / pe_<level> macros for __init / __exit code Mathias Krause
2014-07-15 23:23 ` Andrew Morton
2014-07-16 6:29 ` Mathias Krause
2014-07-12 14:43 ` [PATCH v2 3/8] x86, acpi: Mark __init strings as such Mathias Krause
2014-07-12 14:43 ` [PATCH v2 4/8] x86, mm: Make x86_init.memory_setup() return a const char * Mathias Krause
2014-07-12 14:43 ` [PATCH v2 5/8] x86, mm: early_panic() - pass on the message as string Mathias Krause
2014-07-12 14:43 ` [PATCH v2 6/8] x86, mm: e820 - mark __init strings as such Mathias Krause
2014-07-12 14:43 ` [PATCH v2 7/8] x86: setup " Mathias Krause
2014-07-12 14:43 ` Mathias Krause [this message]
2014-07-15 23:26 ` [PATCH v2 0/8] Mark literal strings in __init / __exit code Andrew Morton
2014-07-16 6:30 ` Mathias Krause
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=1405176212-12175-9-git-send-email-minipli@googlemail.com \
--to=minipli@googlemail.com \
--cc=akpm@linux-foundation.org \
--cc=hpa@zytor.com \
--cc=joe@perches.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@rasmusvillemoes.dk \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).