diff options
| author | Kai Germaschewski <kai@tp1.ruhr-uni-bochum.de> | 2003-01-24 09:54:04 -0600 |
|---|---|---|
| committer | Kai Germaschewski <kai@tp1.ruhr-uni-bochum.de> | 2003-01-24 09:54:04 -0600 |
| commit | dcc38eae49e06d798497373771ae03f5508a2ec7 (patch) | |
| tree | 5f2ea4f7f329bff12bc4c1d2da2f5186344c452b /include/linux | |
| parent | e4ccd604a353b3d4e61e99d04ac9a2bdd8b66ec4 (diff) | |
kbuild/modules: Record versions for unresolved symbols
In the case of CONFIG_MODVERSIONING, the build step will only
generate preliminary <module>.o objects, and an additional
postprocessing step is necessary to record the versions of the unresolved
symbols and add them into the final <module>.ko
The version information for unresolved symbols is again recorded into
a special section, "__versions", which contains an array of symbol
name strings and checksum (struct modversion_info). Size is here not
an issue, since this section will not be stored permanently in kernel
memory.
Makefile.modver takes care of the following steps:
o Collect the version information for all exported symbols from vmlinux
and all modules which export symbols.
o For each module, generate a C file which contains the modversion
information for all unresolved symbols in that module.
o For each module, compile that C file to an object file
o Finally, link the <module>.ko using the preliminary <module.o> + the
version information above.
The first two steps are currently done by not very efficient scripting,
so there's room for performance improvement using some helper C code.
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/module.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/module.h b/include/linux/module.h index af4272910b27..e8726d9909d7 100644 --- a/include/linux/module.h +++ b/include/linux/module.h @@ -33,12 +33,19 @@ #endif #define MODULE_NAME_LEN (64 - sizeof(unsigned long)) + struct kernel_symbol { unsigned long value; const char *name; }; +struct modversion_info +{ + unsigned long crc; + char name[MODULE_NAME_LEN]; +}; + /* These are either module local, or the kernel's dummy ones. */ extern int init_module(void); extern void cleanup_module(void); |
