All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rusty Russell <rusty@rustcorp.com.au>
To: sparclinux@vger.kernel.org
Subject: Re: Compiling modules question
Date: Tue, 30 Mar 2004 00:21:12 +0000	[thread overview]
Message-ID: <1080606072.24982.17.camel@bach> (raw)
In-Reply-To: <20040329201901.GD30251@artsapartment.org>

On Tue, 2004-03-30 at 08:42, Keith M Wesolowski wrote:
> On Mon, Mar 29, 2004 at 02:19:01PM -0600, Art Haas wrote:
> 
> > Here's another question for the list that I've not been able to
> > answer. When I compile a kernel with modules, the modules all have
> > problems with undefined symbols like 'udiv', 'urem', etc. As
> 
> The problem is with depmod, not with the kernel.  Your modules will
> build, load and work fine without any changes.
> 
> Rusty, this matches the change to modpost.c from a while back; does it
> look OK to you?

Ick, I missed that change to modpost.c.

I really dislike this approach: we already have the code everywhere to
ignore the first dot, and I'd prefer sparc use that same trick.

ie:

1) make rem, urem, mul, umul, div and udiv aliases to .rem, .urem etc:

   extern int rem(int, int) __attribute__((weak,alias(".rem")));

2) EXPORT_SYMBOL(rem) etc.

3) Check genksyms recognises that prototype (it should).

4) Copy "dedotify" from ppc64 to handle them on load.

The only real downside is the risk that someone else will export
those names, but I think that's pretty unlikely.

I don't have sparc here: if noone wants to do the work I can produce
a patch, but someone will need to test...

Cheers,
Rusty.
-- 
Anyone who quotes me in their signature is an idiot -- Rusty Russell


  parent reply	other threads:[~2004-03-30  0:21 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-29 20:19 Compiling modules question Art Haas
2004-03-29 20:30 ` David S. Miller
2004-03-29 21:19 ` Keith M Wesolowski
2004-03-29 21:29 ` Jason Wever
2004-03-29 22:42 ` Keith M Wesolowski
2004-03-30  0:21 ` Rusty Russell [this message]
2004-03-30  1:35 ` Art Haas
2004-03-30  7:43 ` Keith M Wesolowski
2004-03-30  8:03 ` David S. Miller
2004-03-31  0:18 ` 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=1080606072.24982.17.camel@bach \
    --to=rusty@rustcorp.com.au \
    --cc=sparclinux@vger.kernel.org \
    /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.