kernel-roulette icon indicating copy to clipboard operation
kernel-roulette copied to clipboard

Undefined symbols

Open iakshay opened this issue 5 years ago • 1 comments

Hi,

The make succeeds for me, but I'm getting the following warnings. Any idea on what could be going wrong here?

I'm using rust nightly (1.35), clang 5.0 and linux kernel 4.20.6+.

WARNING: "sample" [/usr/src/kernel-roulette/build/roulette.ko] undefined! WARNING: "get_chance" [/usr/src/kernel-roulette/build/roulette.ko] undefined! WARNING: "rust_mod_init" [/usr/src/kernel-roulette/build/roulette.ko] undefined! WARNING: "rust_mod_exit" [/usr/src/kernel-roulette/build/roulette.ko] undefined!

Thanks!

iakshay avatar Apr 17 '19 17:04 iakshay

@iakshay The build operation looks incomplete. You should find an error when you do 'insmod'. The cause of the error is the behavior of Makefile.build in "/lib/modules/uname -r/build/scripts". A linker doesn't link ".a" files because this Makefile ignores (filters) ".a" files.

Please try to apply this patch to fix this problem. https://gist.github.com/4ge32/6b4a58fbfce3c5b6ac3012a93f400263

morihiro1978 avatar Sep 10 '19 04:09 morihiro1978