History

module: fix symbol versioning with symbol prefixes

Fix symbol versioning on architectures with symbol prefixes. Although the build was free from warnings the actual modules still wouldn't load as the ____versions table contained unprefixed symbol names, which were being compared against the prefixed symbol names when checking the symbol versions. This is fixed by modifying modpost to add the symbol prefix to the ____versions table it outputs (Modules.symvers still contains unprefixed symbol names). The check_modstruct_version() function is also fixed as it checks the version of the unprefixed "module_layout" symbol which would no longer work.

James Hogan committed 13 years ago

Commit a4b6a771 parent b92021b2 files · +4 −2Browse files

Showing the changes to scripts/mod (1 of 2 files). Show all

Unified · Split

scripts/mod/modpost.c+2−1
@@ -1928,7 +1928,8 @@ static int add_versions(struct buffer *b, struct module *mod) · 1927 unmodified lines
19281928 s->name, mod->name);
19291929 continue;
19301930 }
1931− buf_printf(b, "\t{ %#8x, \"%s\" },\n", s->crc, s->name);
1931+ buf_printf(b, "\t{ %#8x, VMLINUX_SYMBOL_STR(%s) },\n",
1932+ s->crc, s->name);
19321933 }
19331934
19341935 buf_printf(b, "};\n");