From: Rusty Russell <rusty@rustcorp.com.au>
To: torvalds@transmeta.com
Cc: linux-kernel@vger.kernel.org, rth@twiddle.net
Subject: [PATCH] Richard Henderson for President!
Date: Fri, 17 Jan 2003 15:49:15 +1100 [thread overview]
Message-ID: <20030117045054.9A2F72C073@lists.samba.org> (raw)
Linus, please apply. Makes symbol_get work if !CONFIG_MODULE.
Name: symbol_get fix
Author: Rusty Russell
Status: Trivial
D: Make symbol_get() use undefined weak symbols if !CONFIG_MODULE.
D: Many thanks to RTH for introducing undef weak symbols to me.
diff -urpN --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal .932-linux-2.5-bk/include/linux/module.h .932-linux-2.5-bk.updated/include/linux/module.h
--- .932-linux-2.5-bk/include/linux/module.h 2003-01-17 12:59:22.000000000 +1100
+++ .932-linux-2.5-bk.updated/include/linux/module.h 2003-01-17 15:44:57.000000000 +1100
@@ -344,7 +344,7 @@ static inline int module_text_address(un
}
/* Get/put a kernel symbol (calls should be symmetric) */
-#define symbol_get(x) (&(x))
+#define symbol_get(x) ({ extern typeof(x) x __attribute__((weak)); &(x); })
#define symbol_put(x) do { } while(0)
#define symbol_put_addr(x) do { } while(0)
--
Anyone who quotes me in their sig is an idiot. -- Rusty Russell.
reply other threads:[~2003-01-17 4:41 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20030117045054.9A2F72C073@lists.samba.org \
--to=rusty@rustcorp.com.au \
--cc=linux-kernel@vger.kernel.org \
--cc=rth@twiddle.net \
--cc=torvalds@transmeta.com \
/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®