lib.a causing modules not to load
From: James Bottomley
Date: Fri Nov 07 2003 - 20:02:21 EST
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
-
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/