public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* lib.a causing modules not to load
@ 2003-11-07 16:21 James Bottomley
  2003-11-07 16:27 ` James Bottomley
  2003-11-08  4:34 ` Andrew Morton
  0 siblings, 2 replies; 8+ messages in thread
From: James Bottomley @ 2003-11-07 16:21 UTC (permalink / raw)
  To: Linux Kernel; +Cc: Rusty Russell

I think this has been mentioned before, but I just ran across it again
recently.  The problem is that if the only reference to a routine in
lib.a is in a module, then it never gets compiled into the kernel, and
the module won't load.

In 2.6.0-test9 this is shown by compiling both ext2 and ext3 as
modules.  Since they're the only things to refer to percpu_counter_mod
which is in lib.a in an SMP system.

The quickest hack I could think of (attached below) was to make ext2
(and ext3 although I didn't code that) incorporate vestigial code into
the discarded init section of the kernel which forces a reference to
percpu_counter_mod and thus makes the kernel pull the required routine
out of lib.a

However, I think the best approach would be, after the kernel has built,
to build the non-included routines of lib.a as individual modules which
would then be pulled in by the module dependency rules.

Unless anyone has a better idea (or has already done something about
this problem), I'll look at doing the latter.

James



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2003-11-19  1:41 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-11-07 16:21 lib.a causing modules not to load James Bottomley
2003-11-07 16:27 ` James Bottomley
2003-11-08  4:34 ` Andrew Morton
2003-11-08  8:51   ` Christoph Hellwig
2003-11-08 15:16     ` James Bottomley
2003-11-17  2:47       ` Rusty Russell
2003-11-18 16:25         ` James Bottomley
2003-11-19  0:06           ` Rusty Russell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox