当我编写内核扩展时,我在AIX 6.1中找不到文件“/usr/lib/kernex.exp”

时间:2013-12-11 03:34:54

标签: kernel aix kernel-extension

我打了一个“hello world”aix内核扩展,然后我“make”它。 我的makefile如下:

all:kernext_hello
kernext_hello:kernext_hello.c
        gcc -D_KERNEL -maix64 -c kernext_hello.c -o kernext_hello.o
        ld -b64 -o kernext_hello kernext_hello.o -e hello_init -bI:/usr/lib/kernex.exp -lsys -lcsys
clean:
        rm -f *.o kernext_hello 2> /dev/null

错误信息:

gcc -D_KERNEL -maix64 -c kernext_hello.c -o kernext_hello.o
        ld -b64 -o kernext_hello kernext_hello.o -e hello_init -bI:/usr/lib/kernex.exp -lsys -lcsys
ld: 0706-005 Cannot find or open file: kernext_hello.o
        ld: open(): A file or directory in the path name does not exist.
ld: 0706-006 Cannot find or open library file: -l sys
        ld: open(): A file or directory in the path name does not exist.
ld: 0706-006 Cannot find or open library file: -l csys
        ld: open(): A file or directory in the path name does not exist.
ld: 0706-003 Cannot find or read import file: /usr/lib/kernex.exp
        ld: accessx(): A file or directory in the path name does not exist.
make: 1254-004 The error code from the last command is 255.

所以我想知道我的aix 6.1中没有“libsys”,“libcs​​ys”和“/usr/lib/kernex.exp”。

那么你们能帮助我吗?

1 个答案:

答案 0 :(得分:1)

您可能需要安装bos.adt.all。 kernexp.exp是bos.adt.syscalls的一部分,但我会安装整套以减少挫败感。