Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753226AbaGLOoj (ORCPT ); Sat, 12 Jul 2014 10:44:39 -0400 Received: from mail-wi0-f170.google.com ([209.85.212.170]:49642 "EHLO mail-wi0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753030AbaGLOoX (ORCPT ); Sat, 12 Jul 2014 10:44:23 -0400 From: Mathias Krause To: Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" Cc: Joe Perches , Rasmus Villemoes , Andrew Morton , linux-kernel@vger.kernel.org, Mathias Krause Subject: [PATCH v2 8/8] kallsyms: exclude pseudo symbols for __init / __exit strings Date: Sat, 12 Jul 2014 16:43:32 +0200 Message-Id: <1405176212-12175-9-git-send-email-minipli@googlemail.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1405176212-12175-1-git-send-email-minipli@googlemail.com> References: <1405176212-12175-1-git-send-email-minipli@googlemail.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The __init_str() / __exit_str() annotations create pseudo symbols. Ignore them, they have no value for us. Signed-off-by: Mathias Krause --- 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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/