modpost: decreasing the log print level
PATCH 1/1 modpost: decreasing the log print level
We are doing a kernel hot patch and have modified the internal implementation of an exported function (funcA) while also adding a new function (funcB) and exporting it. The compilation of the kernel hot patch failed, and the print is as follows:. export_stymbol section contains strange symbol '(unknown)'.
I found that there was a change in whether to call sym_add_exported. Before commit ddb5cdbafaaa ("kbuild: generate KSYMTAB entries by modpost")
committed, it only judged whether it was equal to __ksymtab_. But now,
it obtains the export symbol by traversing the. rela.export_symbol section and then calls check_export_symbol. In the above case, the. rela.export_symbol section will have additional funcA information, but no export information. This will lead to an error in calling check_export_symbol (null is returned when find_fromsym processes funcA), and the hot patch make fails.
--- scripts/mod/modpost.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/mod/modpost.c +1 -1
@@ -1075,7 +1075,7 @@ static void check_export_symbol(struct module *mod, struct elf_info *elf, label_name =sym_name (elf, label);if (!strstarts (label_name, prefix)) { -error ("%s: .export_symbol section contains strange symbol '%s'\n" , +warn ("%s: .export_symbol section contains strange symbol '%s'\n" , mod->name, label_name);return ; }
Signature · 1 line
2.33.0