Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755456AbZDZCMq (ORCPT ); Sat, 25 Apr 2009 22:12:46 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755445AbZDZCL7 (ORCPT ); Sat, 25 Apr 2009 22:11:59 -0400 Received: from BISCAYNE-ONE-STATION.MIT.EDU ([18.7.7.80]:53572 "EHLO biscayne-one-station.mit.edu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755508AbZDZCL6 (ORCPT ); Sat, 25 Apr 2009 22:11:58 -0400 From: Tim Abbott To: Sam Ravnborg Cc: Linus Torvalds , Linux kernel mailing list , Anders Kaseorg , Waseem Daher , Denys Vlasenko , Rusty Russell , Andi Kleen , "H. Peter Anvin" , Stephen Rothwell , Jeff Arnold , Andrew Morton , Jon Masters , Masami Hiramatsu , "Theodore Ts'o" , Nikanth Karthikesan , Arjan van de Ven , Paul Mundt , =?utf-8?q?Am=C3=A9rico=20Wang?= , Ralf Baechle , Kyle McMartin , David Howells , Tim Abbott Subject: [PATCH 15/15] modpost: convert modpost to use HEAD_TEXT_SECTION macro. Date: Sat, 25 Apr 2009 22:11:10 -0400 Message-Id: <1240711870-30505-15-git-send-email-tabbott@mit.edu> X-Mailer: git-send-email 1.6.2.1 In-Reply-To: <1240711870-30505-14-git-send-email-tabbott@mit.edu> References: <1240711870-30505-1-git-send-email-tabbott@mit.edu> <1240711870-30505-2-git-send-email-tabbott@mit.edu> <1240711870-30505-3-git-send-email-tabbott@mit.edu> <1240711870-30505-4-git-send-email-tabbott@mit.edu> <1240711870-30505-5-git-send-email-tabbott@mit.edu> <1240711870-30505-6-git-send-email-tabbott@mit.edu> <1240711870-30505-7-git-send-email-tabbott@mit.edu> <1240711870-30505-8-git-send-email-tabbott@mit.edu> <1240711870-30505-9-git-send-email-tabbott@mit.edu> <1240711870-30505-10-git-send-email-tabbott@mit.edu> <1240711870-30505-11-git-send-email-tabbott@mit.edu> <1240711870-30505-12-git-send-email-tabbott@mit.edu> <1240711870-30505-13-git-send-email-tabbott@mit.edu> <1240711870-30505-14-git-send-email-tabbott@mit.edu> X-Spam-Flag: NO X-Spam-Score: 0.00 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2012 Lines: 55 Using the HEAD_TEXT_SECTION macro in modpost requires including a few more files from the linux headers. The entry in head_sections[] ".head.text*" should be ".head.text", since only that section name is actually used by any architectures. I corrected this since preserving this over-broad pattern would have involved some string concatination nastiness. Signed-off-by: Tim Abbott Cc: Rusty Russell --- scripts/mod/modpost.c | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c index df6e628..f93645f 100644 --- a/scripts/mod/modpost.c +++ b/scripts/mod/modpost.c @@ -16,6 +16,8 @@ #include #include "modpost.h" #include "../../include/linux/license.h" +#include "../../include/linux/section-names.h" +#include "../../include/linux/stringify.h" /* Are we using CONFIG_MODVERSIONS? */ int modversions = 0; @@ -818,7 +820,7 @@ static const char *symbol_white_list[] = NULL }; -static const char *head_sections[] = { ".head.text*", NULL }; +static const char *head_sections[] = { __stringify(HEAD_TEXT_SECTION), NULL }; static const char *linker_symbols[] = { "__init_begin", "_sinittext", "_einittext", NULL }; @@ -942,8 +944,8 @@ static int section_mismatch(const char *fromsec, const char *tosec) * *probe_one, *_console, *_timer * * Pattern 3: - * Whitelist all refereces from .text.head to .init.data - * Whitelist all refereces from .text.head to .init.text + * Whitelist all refereces from HEAD_TEXT_SECTION to .init.data + * Whitelist all refereces from HEAD_TEXT_SECTION to .init.text * * Pattern 4: * Some symbols belong to init section but still it is ok to reference -- 1.6.2.1 -- 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/