A method, and a corresponding mechanism, are used for creating a self-describing kernel module. The method includes the steps of expressing data describing a module in a modmeta file format and creating a C language source file. The C language source file is created by translating the expressed data into a series of C language data structures, wherein the series of C language data structures comprises the C language source file. The C language source file is then compiled and linked into the module itself, thus making the module contain its own descriptive data.