Skip to content

Commit 5ce2176

Browse files
committed
genksyms: adjust the output format to modpost
Make genksyms output symbol versions in the format modpost expects, so the 'sed' is unneeded. This commit makes *.symversions completely unneeded. I will keep *.symversions in .gitignore and 'make clean' for a while. Otherwise, 'git status' might be surprising. Signed-off-by: Masahiro Yamada <[email protected]> Reviewed-by: Nicolas Schier <[email protected]> Tested-by: Nathan Chancellor <[email protected]> Tested-by: Sedat Dilek <[email protected]> # LLVM-14 (x86-64)
1 parent 7375cbc commit 5ce2176

File tree

2 files changed

+1
-7
lines changed

2 files changed

+1
-7
lines changed

scripts/Makefile.build

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -165,16 +165,10 @@ ifdef CONFIG_MODVERSIONS
165165
# o modpost will extract versions from that file and create *.c files that will
166166
# be compiled and linked to the kernel and/or modules.
167167

168-
genksyms_format := __crc_\(.*\) = \(.*\);
169-
170168
gen_symversions = \
171169
if $(NM) $@ 2>/dev/null | grep -q __ksymtab; then \
172170
$(call cmd_gensymtypes_$(1),$(KBUILD_SYMTYPES),$(@:.o=.symtypes)) \
173-
174-
sed -n 's/$(genksyms_format)/$(pound)SYMVER \1 \2/p' [email protected] \
175171
>> $(dot-target).cmd; \
176-
else \
177-
178172
fi
179173

180174
cmd_gen_symversions_c = $(call gen_symversions,c)

scripts/genksyms/genksyms.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -680,7 +680,7 @@ void export_symbol(const char *name)
680680
if (flag_dump_defs)
681681
fputs(">\n", debugfile);
682682

683-
printf("__crc_%s = 0x%08lx;\n", name, crc);
683+
printf("#SYMVER %s 0x%08lx\n", name, crc);
684684
}
685685
}
686686

0 commit comments

Comments
 (0)