I added a new system call in the kernel, but a problem about _syscallN() macros
Hi,
I added a temporary system call in the kernel for a test, But when a program calls the system call, an error occurs. When I compiled the following program, an error occured. # vi testcall_test.c Code:
#include <linux/unistd.h> # gcc -I /usr/src/linux-2.6.14.6/include testcall_test.c -o testcall_test Code:
/usr/bin/ld: errno: TLS definition in /lib/libc.so.6 section .tbss mismatches non-TLS reference in /tmp/ccCGdJnX.o it works properly. WHAT IS WRONG WITH THE ABOVE? And how can I solve the problem? Please, help me. # vi testcall_test.c Code:
#include <linux/unistd.h> # vi testcall_test.c Code:
#include <linux/unistd.h> # # ls testcall_test testcall_test.c # ./testcall_test testcall success! # I heard that the _syscallN() macros are gone in 2.6.20 and later. But the current kernel version is 2.6.14.6 |
I should have added "#include <error.h>"
Thank you. |
Well done fixing it & updating your own question with the fix!
|
All times are GMT -5. The time now is 07:48 PM. |