It might be nice but it is also expensive. Adding static
inter_module_xxx tables requires
* changes to linux/modules.h to define the new table format and
* changes to vmlinux.lds for _every_ architecture to bring all the
static tables together in vmlinux and
* new initialisation code in module.c to read and load all the static
tables at boot time and
* extra code in modutils to find any static tables in modules and
* an extension to struct modules to let modutils pass information about
the static tables to the kernel and
* the kernel code will only work with an upgraded modutils.
That is a lot of work for a very few special cases. OTOH, you could
just add a few lines of __initcall code in two source files (which I
did when I wrote inter_module_xxx) and swap the order of 3 lines in
drivers/mtd/Makefile. Guess which alternative I am going for?
IMHO any automatic method that relies on ELF sections and/or modutils
support is the wrong approach, it is a complex solution with external
dependencies when we already have a simple solution with no external
dependencies. What next, static tables for file system registration,
for device registration?
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/