module: Account for the build time module name mangling
authorPeter Zijlstra <peterz@infradead.org>
Fri, 2 May 2025 14:12:08 +0000 (16:12 +0200)
committerMasahiro Yamada <masahiroy@kernel.org>
Sun, 25 May 2025 09:12:08 +0000 (18:12 +0900)
commit0267cbf297bf7ed9ef5181feceea9fe03c84318e
tree7800ed80e7b52651b73103b96dfcc9d2b4f40299
parent754f8733fc09dd92093cfbd34fa71a42d152b250
module: Account for the build time module name mangling

Sean noted that scripts/Makefile.lib:name-fix-token rule will mangle
the module name with s/-/_/g.

Since this happens late in the build, only the kernel needs to bother
with this, the modpost tool still sees the original name.

Reported-by: Sean Christopherson <seanjc@google.com>
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Tested-by: Sean Christopherson <seanjc@google.com>
Reviewed-by: Petr Pavlu <petr.pavlu@suse.com>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
kernel/module/main.c