Re: in-kernel linking issues

From: Richard Henderson (rth@twiddle.net)
Date: Fri Nov 15 2002 - 18:47:47 EST


On Sat, Nov 16, 2002 at 09:45:21AM +1100, Rusty Russell wrote:
> > Actually, I've yet to come across one that is adversely affected.
> > Note that we're putting code _not_ compiled with -fpic into this
> > shared object.
>
> Hmm, OK, I'm officially confused: I always connected the two.

I encorage this view. Normally bad things happen when this rule is
not followed in userland. But the kernel can bend the rules a bit.

> Of course. And ia64's module.c is about 500 lines (vs 130 for x86).
> It's probably the worst case unless Alpha proves to be a complete pig
> (note: ia64 might be missing some other stuff, but the linker is
> tested).

The ia64 code you have isn't going to be reliable until the
other points I mentioned wrt section and common symbol sorting
are done. What you have will work until there's a large
variable (32k for alpha/mips, 1MB for ia64) in the data area.

> Hmm, OK, I guess this is where I say "patch welcome"?

I guess this is where I say "patch for what"? Do I have some
amount of buy-in for the shared library approach, or do I start
adding lots of code to your .o linker?

I guess I could work up a proof-of-concept patch for the former
and see what people think...

r~
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Fri Nov 15 2002 - 22:00:39 EST