Imagine this:
1. two modules A and B.
2. B requires some data exported (and initialized!) by A.
3. both A and B can be compiled statically into the kernel if user so
wishes during "make xconfig".
4. both A and B use module_init()/exit() macros.
If both modules are compiled as modules or if A is statically linked then
there are no problems - A always preceedes B and B always has the required
structures ready (if both are modules - via depmod mechanism).
If, however, both A and B are compiled it the monolithic kernel, then it
is a matter of whose module_init() gets called first during do_initcalls()
loop. How deterministics is this? I presume it depends on the link order?
What should one do to the Makefiles to be guaranteed to have A's init()
function closer to __initcall_start than that of module B?
regards,
------
Tigran A. Aivazian | http://www.sco.com
Escalations Research Group | tel: +44-(0)1923-813796
Santa Cruz Operation Ltd | http://www.ocston.org/~tigran
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/