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: Tue, 14 Jan 2003 14:11:30 +1100 [thread overview]
Message-ID: <20030114032138.5C1E92C2C5@lists.samba.org> (raw)
In-Reply-To: Your message of "Mon, 13 Jan 2003 11:00:36 -0800." <20030113110036.A873@twiddle.net>
In message <20030113110036.A873@twiddle.net> you write:
> I discovered this while working on oprofile for Alpha. I thought
> I'd avoid a whole series of nested ifdefs by marking some symbols
> weak, and so let them go undefined and resolve to null. Except
> that we don't handle that in the new module loader.
>
> Fixed thus.
That part looks OK. The second loop was only there so we placed
common symbols first: now we don't do that, your cleanup is a good
idea. I'll extract and test that part.
>
> I also correct a misconception in simplify_symbol. It is pointless
> to lookup an undefined symbol in the module in which it is undefined.
<sigh>. I don't think so.
PPC64 (not in tree yet):
+ /* REL24 references to (external) .function won't
+ resolve; deal with that below */
+ if (!sym->st_value
+ && ELF64_R_TYPE(rela[i].r_info) != R_PPC_REL24) {
+ printk("%s: Unknown symbol %s (index %u)\n",
+ me->name, strtab + sym->st_name,
+ sym->st_shndx);
+ return -ENOENT;
+ }
That's *why* find_symbol_internal() is not static, and why we don't
fail in simplify_symbol() 8(
Hope that clarifies,
Rusty.
--
Anyone who quotes me in their sig is an idiot. -- Rusty Russell.
next prev parent reply other threads:[~2003-01-14 3:12 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 [this message]
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
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=20030114032138.5C1E92C2C5@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;
as well as URLs for NNTP newsgroup(s).