tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
MODULAR: Module extensions
Hello,
I see that the new modular framework still uses .o as the extensions
for modules. In my opinion, these are "suboptimal" because they are
confusing. Extensions are something for the user, not the computer,
so they should be descriptive enough to be useful. When I see ".o",
I think of a temporary compilation file that can be deleted, not
something that should be kept around for proper system operation.
Could we rename the new modules to have a different extension? One
possibility could be .ko as used in Linux, or .kmod to match the name
of bsd.kmod.mk. If we want to be descriptive, .kmod is better as it
clearly states it is a kernel module, not a kernel object (which
could also be thought as of something related to the compilation).
Slightly related to this: with the current bsd.kmod.mk and .o
extensions, it is impossible to build a foo.o kernel module if any of
its source files is named foo.c. E.g. sys/modules/example is
currently unbuidable:
> nbmake-i386
nbmake: Graph cycles through example.o
nbmake: don't know how to make example.4. Stop
nbmake: stopped in /Volumes/NetBSD/src/sys/modules/example
>
bsd.kmod.mk will try to compile foo.c to foo.o and then try to link
all .o files into foo.o. Oops, but foo.o is already defined to be
foo.c's object, so we have a dependency loop. Having a different
extension for the final file easily fixes this.
Objections about the change to .kmod?
Thanks.
Home |
Main Index |
Thread Index |
Old Index