[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1408623792-7973-4-git-send-email-minipli@googlemail.com>
Date: Thu, 21 Aug 2014 14:23:06 +0200
From: Mathias Krause <minipli@...glemail.com>
To: Andrew Morton <akpm@...ux-foundation.org>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>,
"H. Peter Anvin" <hpa@...or.com>
Cc: Joe Perches <joe@...ches.com>,
Rasmus Villemoes <linux@...musvillemoes.dk>,
linux-kernel@...r.kernel.org,
Mathias Krause <minipli@...glemail.com>
Subject: [PATCHv3 3/9] kallsyms: exclude pseudo symbols for __init / __exit strings
The __init_str() / __exit_str() annotations create pseudo symbols.
Ignore them, they have no value for us.
Signed-off-by: Mathias Krause <minipli@...glemail.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists