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
1928 s->name, mod->name);1928 s->name, mod->name);
1929 continue;1929 continue;
1930 }1930 }
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);
1932 }1933 }
1933 1934
1934 buf_printf(b, "};\n");1935 buf_printf(b, "};\n");