From: Rusty Russell <rusty@rustcorp.com.au>
To: Richard Henderson <rth@twiddle.net>
Cc: torvalds@transmeta.com, linux-kernel@vger.kernel.org
Subject: Re: [MODULES] fix weak symbol handling
Date: Wed, 15 Jan 2003 15:39:43 +1100 [thread overview]
Message-ID: <20030115044228.BD6C02C04D@lists.samba.org> (raw)
In-Reply-To: Your message of "Tue, 14 Jan 2003 17:12:50 -0800." <20030114171250.C5751@twiddle.net>
In message <20030114171250.C5751@twiddle.net> you write:
> On Tue, Jan 14, 2003 at 07:39:44PM +1100, Rusty Russell wrote:
> > After that's reverted, here's my implementation. Richard?
>
> Nope. Doesn't handle undef weak. Handling of defined weak
> I'm not sure is necessary at all; I can't think of any good
> use for it in the kernel.
I didn't know about undefined weak symbols. I was thinking:
int nosupport_function(void)
{
return -ENOSYS;
}
extern int support_function(void)
__attribute__((alias("nosupport_function"), weak));
....
int init(void)
{
/* Or you could simply call it... */
if (support_function == nosupport_function)
...
Of course, you can use symbol_get and symbol_put, too, but they don't
work if !CONFIG_MODULES: I chose to implement that case as simply a
reference, so you'll get a link failure: see linux/module.h.
Rusty.
--
Anyone who quotes me in their sig is an idiot. -- Rusty Russell.
prev parent reply other threads:[~2003-01-15 4:33 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-01-13 19:00 [MODULES] fix weak symbol handling Richard Henderson
2003-01-14 3:11 ` Rusty Russell
2003-01-15 1:10 ` Richard Henderson
2003-01-14 3:57 ` Rusty Russell
2003-01-15 1:07 ` Richard Henderson
2003-01-14 8:39 ` Rusty Russell
2003-01-15 1:12 ` Richard Henderson
2003-01-15 4:39 ` Rusty Russell [this message]
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=20030115044228.BD6C02C04D@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.