Compilation redhat对系统调用函数的未定义引用

Compilation redhat对系统调用函数的未定义引用,compilation,linux-kernel,redhat,Compilation,Linux Kernel,Redhat,我正在尝试向redhatlinux2.4.18-14内核添加4个新的系统调用 我遵循以下步骤: 1-在arch/i386/kernel/entry.Ssys\u call\u table中,我在末尾添加了以下几行: .long SYMBOL_NAME(sys_add_TODO) /* 243 */ .long SYMBOL_NAME(sys_read_TODO) /* 244 */ .long SYMBOL_NAME(sys_mark

我正在尝试向redhat
linux2.4.18-14
内核添加4个新的系统调用

我遵循以下步骤:

1-在
arch/i386/kernel/entry.S
sys\u call\u table
中,我在末尾添加了以下几行:

.long SYMBOL_NAME(sys_add_TODO)             /* 243 */
    .long SYMBOL_NAME(sys_read_TODO)            /* 244 */
    .long SYMBOL_NAME(sys_mark_TODO)            /* 245 */
    .long SYMBOL_NAME(sys_delete_TODO)          /* 245 */
2-更新了
MakeFile
: 添加了
sys\u todo.o
obj-y

3-添加了
sys\u todo.h
,其中包含对
include/linux

4-添加了
sys\u todo.c
,它实现了对文件夹
kernel
的sys调用函数(当然,我在源代码中包括了
sys\u todo.h

sys call函数头的示例:
int sys\u add\u TODO(pid\u t pid,char*TODO\u description,ssize\u t description\u size)

我使用以下脚本编译内核:

FLAG=$1 
cd /usr/src/linux-2.4.18-14custom
make bzImage

if [ $FLAG = '-m' ] ; then
    make modules
    make modules_install
fi

make install
cd /boot
mkinitrd –f 2.4.18-14custom.img 2.4.18-14custom
#reboot
我得到的错误是:

arch/i386/kernel/kernel.o: In function `sys_call_table':
arch/i386/kernel/kernel.o(.data+0x43c): undefined reference to `sys_add_TODO'
arch/i386/kernel/kernel.o(.data+0x440): undefined reference to `sys_read_TODO'
arch/i386/kernel/kernel.o(.data+0x444): undefined reference to `sys_mark_TODO'
arch/i386/kernel/kernel.o(.data+0x448): undefined reference to `sys_delete_TODO'
make: *** [vmlinux] Error 2

如何解决此问题?

您是否在entry.S中包含sys_todo.h?不,为什么有必要?另外,您是否编辑了include/asm/unistd.h?您的意思是
linux/unistd
?不在entry.S中(我没有接触任何“原始”行,但我添加了这些行)