lkml.org 
[lkml]   [2014]   [Jul]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH v2 8/8] kallsyms: exclude pseudo symbols for __init / __exit strings
Date
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


\
 
 \ /
  Last update: 2014-07-12 17:21    [W:1.962 / U:0.048 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site