Q:

undefined reference to system call added to kernel

After adding the system call to kernel I tried to compile the kernel.
It ran for 2 hours and at the end throw the below mentioned error [screenshot]

undefined reference to 

Any idea what had happened.
Kernel 3.9.3 
steps followed are - 
get kernel codes from www.kernel.org.
wget http://www.kernel.org/pub/linux/kernel/v3.0/linux-3.3.1.tar.bz2
Upzip it with command ‘tar xvfj XXX” to a folder For example : /root/kernel tar xvfj linux-3.3.1.tar.bz2
Edit file “/root/kernel/linux-3.3.1/arch/x86/syscalls/syscall_64.tbl” Add new line
312 64 husky1 sys_husky1
Eidt file “/root/kernel/linux-3.3.1/include/linux/syscalls.h” Add new function declaration
asmlinkage long sys_husky1(int fd);
before the line “#endif”
Add a new c file under “/root/kernel/linux-3.3.1/arch/x86/kernel” (I am using x86 CPU) Example :
Edit “/root/kernel/linux-3.3.1/arch/x86/kernel/Makefile” Add a new line “obj-y += husky.o”
goto /root/kernel/linux-3.3.1 folder and run command “make –j8”

A:

Search your syscall_64.tbl file for "sys_hello_rana". I am guessing you named your syscall as "sys_hello_rana" in syscall table but you used a different name(sys_husky1) when you defined it.

