Hmm... how about "put export symbols in __ksymtab in object file even
if CONFIG_MODULE=n", just discard them in the final link.
Then build up table from that (we're looking at the objects anyway).
> o For all __initcall__moduleA__ in the objects to be linked into
> vmlinux, find the object that defines it in the symlink tree (its name
> will be moduleA.o).
> o Find the unresolved symbols in that object moduleA.o.
> o For each unresolved symbol in moduleA.o, if you find the symbol in the
> previously recorded pairs of (exported symbols, __initcall__moduleB),
> move __initcall_moduleA behind __initcall_moduleB.
> Probably some issues come up when actually trying to do this, but it
> sounds doable at least in principle.
I'll have to think some more and see if I can come up with something
along these lines.
> Then again, there's also the possibility of completing initramsfs, making
> it mandatory, compiling things always as modules and leaving it to
> "depmod" in initramfs to do the right thing.
If that ever happens... 8)
-- Anyone who quotes me in their sig is an idiot. -- Rusty Russell. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to firstname.lastname@example.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/