mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mike Frysinger <vapier@gentoo.org>
To: Rusty Russell <rusty@rustcorp.com.au>
Cc: linux-kernel@vger.kernel.org, Robin Getz <rgetz@blackfin.uclinux.org>
Subject: [PATCH] module: use MODULE_SYMBOL_PREFIX with module_layout
Date: Fri, 19 Jun 2009 03:49:22 -0400	[thread overview]
Message-ID: <1245397762-13172-1-git-send-email-vapier@gentoo.org> (raw)
In-Reply-To: <200906191508.06537.rusty@rustcorp.com.au>

The check_modstruct_version() needs to look up the symbol "module_layout"
in the kernel, but it does so literally and not by a C identifier.  The
trouble is that it does not include a symbol prefix for those ports that
need it (like the Blackfin and H8300 port).  So make sure we tack on the
MODULE_SYMBOL_PREFIX define to the front of it.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
---
 kernel/module.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/kernel/module.c b/kernel/module.c
index 80036bc..7850bef 100644
--- a/kernel/module.c
+++ b/kernel/module.c
@@ -1053,7 +1053,8 @@ static inline int check_modstruct_version(Elf_Shdr *sechdrs,
 {
 	const unsigned long *crc;
 
-	if (!find_symbol("module_layout", NULL, &crc, true, false))
+	if (!find_symbol(MODULE_SYMBOL_PREFIX "module_layout", NULL,
+	                 &crc, true, false))
 		BUG();
 	return check_version(sechdrs, versindex, "module_layout", mod, crc);
 }
-- 
1.6.3.1


  reply	other threads:[~2009-06-19  7:49 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-18 15:24 module version magic and arches with symbol prefixes Mike Frysinger
2009-06-19  5:38 ` Rusty Russell
2009-06-19  7:49   ` Mike Frysinger [this message]
2009-06-19 14:02     ` [PATCH] module: use MODULE_SYMBOL_PREFIX with module_layout Rusty Russell
2009-06-19 18:29       ` Mike Frysinger
2009-06-19 12:54   ` module version magic and arches with symbol prefixes Robin Getz
2009-06-19 13:14     ` Mike Frysinger
2009-06-19 17:07       ` Robin Getz
2009-06-19 18:32         ` Mike Frysinger
2009-06-23  7:07         ` Rusty Russell
2009-06-29 12:07           ` Robin Getz
2009-07-23 14:12 [PATCH] module: use MODULE_SYMBOL_PREFIX with module_layout Rusty Russell

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=1245397762-13172-1-git-send-email-vapier@gentoo.org \
    --to=vapier@gentoo.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rgetz@blackfin.uclinux.org \
    --cc=rusty@rustcorp.com.au \
    /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

all inboxes | Powered by JetHome®