Re: modules, "modules" and CONFIG_LIST_SORT
From: Linus Torvalds
Date: Sun Mar 07 2010 - 13:14:05 EST
On Sun, 7 Mar 2010, Randy Dunlap wrote:
> On 03/07/10 03:23, Linus Torvalds wrote:
> > Honestly, personally I'd rather have a real library that modules can link
> > to _before_ even loading into kernel space, but that's not how we've
> > traditionally done things. So I guess we should just revert that commit.
> xfs also needs "select LIST_SORT". I posted a patch for that a few days
> ago and now Christoph Hellwig has asked me to send the patch directly to Linus,
> but if Linus is going to revert the 'config LIST_SORT' patch, I'll skip it.
Ok, it's reverted in my tree now, I'll push out soon.
That said, I was serious about the "real library" thing. I do wonder if we
should add a "link with standard kernel libraries" phase to the final
module link, so that we can stop exporting silly things, and handle cases
like this sanely without forcing it on everybody just because some module
_might_ need it.
For example, I've always hated how we export the 'libgcc' kind of symbols
too. I think we'd generally be _much_ better off just linking them into
the module directly, even if that means that we'll have multiple copies. I
hate the things like
that various architectures use. They have _nothing_ to do with real kernel
interfaces, and are usually really small. And on several architectures a
direct-linked call can be optimized by the linker in ways that external
linkage cannot, so it might even improve code in some cases.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/