From: Richard Henderson <rth@twiddle.net>
To: Rusty Russell <rusty@rustcorp.com.au>
Cc: linux-kernel@vger.kernel.org, davem@vger.kernel.org
Subject: Re: [module-init-tools] fix weak symbol handling
Date: Thu, 16 Jan 2003 18:09:13 -0800 [thread overview]
Message-ID: <20030116180913.C15981@twiddle.net> (raw)
In-Reply-To: <20030117015756.409DF2C437@lists.samba.org>; from rusty@rustcorp.com.au on Fri, Jan 17, 2003 at 12:57:03PM +1100
On Fri, Jan 17, 2003 at 12:57:03PM +1100, Rusty Russell wrote:
> > No. The semantics I need is if A references a weak symbol S
> > and *no one* implements it, then S resolves to NULL.
>
> Sorry, I was unclear. I want to know the dependency semantics:
>
> If B exports S, should depmod believe A needs B, or not? Your patch
> leaves that semantic (all it does is suppress the errors).
Well, that depends on whether A defines S or not. If A does
define S, then I don't care. I'd say "no", A does not depend
on B. If A does not define S, then most definitely "yes", as
with any other definition.
> I'm not sure what semantics are "right", since I don't know what
> you're trying to do, or what is wrong with get_symbol().
I just told you. Quoted again above. Perhaps the following
dummy module will make things even clearer.
---
#include <linux/module.h>
#include <linux/init.h>
extern int not_defined __attribute__((weak));
static int init(void)
{
return ¬_defined ? -EINVAL : 0;
}
static void fini(void)
{
}
module_init(init);
module_exit(fini);
---
You should be able to load this module.
r~
next prev parent reply other threads:[~2003-01-17 2:00 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-01-13 19:04 [module-init-tools] fix weak symbol handling Richard Henderson
2003-01-14 3:16 ` Rusty Russell
2003-01-15 1:14 ` Richard Henderson
2003-01-17 1:57 ` Rusty Russell
2003-01-17 2:09 ` Richard Henderson [this message]
2003-01-17 7:34 ` David Woodhouse
2003-01-17 8:56 ` Rusty Russell
2003-01-17 9:32 ` David Woodhouse
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=20030116180913.C15981@twiddle.net \
--to=rth@twiddle.net \
--cc=davem@vger.kernel.org \
--cc=linux-kernel@vger.kernel.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