代码: 全选
#include <linux/module.h>
#include <linux/init.h>
MODULE_LICENSE("GPL");
static int hello_init(void)
{
printk(KERN_ALERT "Hello, world\n");
return 0;
}
static void hello_exit(void)
{
printk(KERN_ALERT "Goodbye, cruel world\n");
}
module_init(hello_init);
module_exit(hello_exit);
代码: 全选
PWD = $(shell pwd)
KERNEL_SRC = /usr/src/linux/
obj-m := hello.o
module-objs := hello.o
all:
$(MAKE) -C $(KERNEL_SRC) M=$(PWD) modules
clean:
rm *.ko
rm *.o
代码: 全选
$ make
make -C /usr/src/linux/ M=/home/yxdtiger modules
make[1]: Entering directory `/usr/src/linux-2.6.24.4'
ERROR: Kernel configuration is invalid.
include/linux/autoconf.h or include/config/auto.conf are missing.
Run 'make oldconfig && make prepare' on kernel src to fix it.
WARNING: Symbol version dump /usr/src/linux-2.6.24.4/Module.symvers
is missing; modules will have no dependencies and modversions.
CC [M] /home/yxdtiger/hello.o
cc1: 错误: include/linux/autoconf.h:No such file or directory
在包含自 include/linux/posix_types.h:47 的文件中,
从 include/linux/types.h:11,
从 include/linux/prefetch.h:13,
从 include/linux/list.h:8,
从 include/linux/module.h:9,
从 /home/yxdtiger/hello.c:1:
/usr/lib/gcc/i486-linux-gnu/4.1.3/include/asm/posix_types.h:13:22: 错误: features.h:No such file or directory
/usr/lib/gcc/i486-linux-gnu/4.1.3/include/asm/posix_types.h:14:35: 错误: 没有包含路径可供搜索 asm/posix_types.h
在包含自 include/linux/prefetch.h:13 的文件中,
从 include/linux/list.h:8,
从 include/linux/module.h:9,
从 /home/yxdtiger/hello.c:1:
include/linux/types.h:12:23: 错误: asm/types.h:No such file or directory
In file included from include/linux/prefetch.h:13,
from include/linux/list.h:8,
from include/linux/module.h:9,
from /home/yxdtiger/hello.c:1:
include/linux/types.h:16: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__kernel_dev_t’
include/linux/types.h:19: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘dev_t’
include/linux/types.h:20: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘ino_t’
include/linux/types.h:21: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘mode_t’
include/linux/types.h:22: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘nlink_t’
include/linux/types.h:23: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘off_t’
include/linux/types.h:24: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘pid_t’
include/linux/types.h:25: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘daddr_t’
include/linux/types.h:27: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘suseconds_t’
include/linux/types.h:28: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘timer_t’
include/linux/types.h:29: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘clockid_t’
include/linux/types.h:35: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘uid_t’
include/linux/types.h:36: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘gid_t’
include/linux/types.h:37: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘uid16_t’
include/linux/types.h:38: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘gid16_t’
include/linux/types.h:57: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘loff_t’
include/linux/types.h:66: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘size_t’
include/linux/types.h:71: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘ssize_t’
include/linux/types.h:76: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘ptrdiff_t’
include/linux/types.h:81: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘time_t’
include/linux/types.h:86: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘clock_t’
include/linux/types.h:91: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘caddr_t’
include/linux/types.h:109: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘u_int8_t’
include/linux/types.h:110: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘int8_t’
include/linux/types.h:111: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘u_int16_t’
include/linux/types.h:112: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘int16_t’
include/linux/types.h:113: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘u_int32_t’
include/linux/types.h:114: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘int32_t’
include/linux/types.h:118: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘uint8_t’
include/linux/types.h:119: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘uint16_t’
include/linux/types.h:120: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘uint32_t’
include/linux/types.h:123: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘uint64_t’
include/linux/types.h:124: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘u_int64_t’
include/linux/types.h:125: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘int64_t’
include/linux/types.h:180: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__le16’
include/linux/types.h:181: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__be16’
include/linux/types.h:182: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__le32’
include/linux/types.h:183: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__be32’
include/linux/types.h:185: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__le64’
include/linux/types.h:186: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__be64’
include/linux/types.h:188: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__sum16’
include/linux/types.h:189: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__wsum’
include/linux/types.h:197: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘resource_size_t’
include/linux/types.h:203: 错误: expected specifier-qualifier-list before ‘__kernel_daddr_t’
在包含自 include/linux/list.h:8 的文件中,
从 include/linux/module.h:9,
从 /home/yxdtiger/hello.c:1:
include/linux/prefetch.h:14:27: 错误: asm/processor.h:No such file or directory
include/linux/prefetch.h:15:23: 错误: asm/cache.h:No such file or directory
In file included from include/linux/list.h:8,
from include/linux/module.h:9,
from /home/yxdtiger/hello.c:1:
include/linux/prefetch.h:53: 错误: expected declaration specifiers or ‘...’ before ‘size_t’
在包含自 include/linux/module.h:9 的文件中,
从 /home/yxdtiger/hello.c:1:
include/linux/list.h:9:24: 错误: asm/system.h:No such file or directory
In file included from include/linux/module.h:9,
from /home/yxdtiger/hello.c:1:
include/linux/list.h: 在函数 ‘__list_add_rcu’ 中:
include/linux/list.h:100: 错误: 隐式声明函数 ‘smp_wmb’
在包含自 include/linux/module.h:10 的文件中,
从 /home/yxdtiger/hello.c:1:
include/linux/stat.h:6:22: 错误: asm/stat.h:No such file or directory
在包含自 include/linux/kernel.h:11 的文件中,
从 include/linux/cache.h:4,
从 include/linux/time.h:7,
从 include/linux/stat.h:60,
从 include/linux/module.h:10,
从 /home/yxdtiger/hello.c:1:
include/linux/linkage.h:4:25: 错误: asm/linkage.h:No such file or directory
在包含自 include/linux/kernel.h:15 的文件中,
从 include/linux/cache.h:4,
从 include/linux/time.h:7,
从 include/linux/stat.h:60,
从 include/linux/module.h:10,
从 /home/yxdtiger/hello.c:1:
include/linux/bitops.h:17:24: 错误: asm/bitops.h:No such file or directory
In file included from include/linux/kernel.h:15,
from include/linux/cache.h:4,
from include/linux/time.h:7,
from include/linux/stat.h:60,
from include/linux/module.h:10,
from /home/yxdtiger/hello.c:1:
include/linux/bitops.h: 在函数 ‘get_bitmask_order’ 中:
include/linux/bitops.h:29: 错误: 隐式声明函数 ‘fls’
include/linux/bitops.h: 在函数 ‘hweight_long’ 中:
include/linux/bitops.h:45: 错误: 隐式声明函数 ‘hweight32’
include/linux/bitops.h:45: 错误: 隐式声明函数 ‘hweight64’
include/linux/bitops.h: 在顶层:
include/linux/bitops.h:53: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘rol32’
include/linux/bitops.h:63: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘ror32’
include/linux/bitops.h: 在函数 ‘fls_long’ 中:
include/linux/bitops.h:72: 错误: 隐式声明函数 ‘fls64’
In file included from include/linux/kernel.h:16,
from include/linux/cache.h:4,
from include/linux/time.h:7,
from include/linux/stat.h:60,
from include/linux/module.h:10,
from /home/yxdtiger/hello.c:1:
include/linux/log2.h: 在顶层:
include/linux/log2.h:32: 错误: expected ‘)’ before ‘n’
include/linux/log2.h:40: 错误: expected ‘)’ before ‘n’
在包含自 include/linux/cache.h:4 的文件中,
从 include/linux/time.h:7,
从 include/linux/stat.h:60,
从 include/linux/module.h:10,
从 /home/yxdtiger/hello.c:1:
include/linux/kernel.h:17:27: 错误: asm/byteorder.h:No such file or directory
include/linux/kernel.h:18:21: 错误: asm/bug.h:No such file or directory
In file included from include/linux/cache.h:4,
from include/linux/time.h:7,
from include/linux/stat.h:60,
from include/linux/module.h:10,
from /home/yxdtiger/hello.c:1:
include/linux/kernel.h:148: 错误: expected declaration specifiers or ‘...’ before ‘size_t’
include/linux/kernel.h:149: 错误: 格式字符串实参不是字符串玵型
include/linux/kernel.h:149: 警告: 与内建函数 ‘snprintf’ 类型冲突
include/linux/kernel.h:150: 错误: expected declaration specifiers or ‘...’ before ‘size_t’
include/linux/kernel.h:151: 错误: 格式字符串实参不是字符串玵型
include/linux/kernel.h:151: 警告: 与内建函数 ‘vsnprintf’ 类型冲突
include/linux/kernel.h:152: 错误: expected declaration specifiers or ‘...’ before ‘size_t’
include/linux/kernel.h:153: 错误: 格式字符串实参不是字符串玵型
include/linux/kernel.h:154: 错误: expected declaration specifiers or ‘...’ before ‘size_t’
include/linux/kernel.h:155: 错误: 格式字符串实参不是字符串玵型
include/linux/kernel.h:251: 错误: expected declaration specifiers or ‘...’ before ‘size_t’
include/linux/kernel.h:253: 错误: expected declaration specifiers or ‘...’ before ‘size_t’
include/linux/kernel.h:256: 错误: expected declaration specifiers or ‘...’ before ‘size_t’
include/linux/kernel.h:258: 错误: expected declaration specifiers or ‘...’ before ‘size_t’
include/linux/kernel.h:319:2: 错误: #error "Please fix asm/byteorder.h"
In file included from include/linux/preempt.h:9,
from include/linux/spinlock.h:49,
from include/linux/seqlock.h:29,
from include/linux/time.h:8,
from include/linux/stat.h:60,
from include/linux/module.h:10,
from /home/yxdtiger/hello.c:1:
include/linux/thread_info.h:23: 错误: expected specifier-qualifier-list before ‘u32’
在包含自 include/linux/preempt.h:9 的文件中,
从 include/linux/spinlock.h:49,
从 include/linux/seqlock.h:29,
从 include/linux/time.h:8,
从 include/linux/stat.h:60,
从 include/linux/module.h:10,
从 /home/yxdtiger/hello.c:1:
include/linux/thread_info.h:34:29: 错误: asm/thread_info.h:No such file or directory
include/linux/thread_info.h:43: 警告: ‘struct thread_info’ 在形参表内部声明
include/linux/thread_info.h:43: 警告: 它的作用域仅限于此定义或声明,这可能并不是您想要的
include/linux/thread_info.h: 在函数 ‘set_ti_thread_flag’ 中:
include/linux/thread_info.h:45: 错误: 隐式声明函数 ‘set_bit’
include/linux/thread_info.h:45: 错误: 提领指向不完全类型的指针
include/linux/thread_info.h: 在顶层:
include/linux/thread_info.h:48: 警告: ‘struct thread_info’ 在形参表内部声明
include/linux/thread_info.h: 在函数 ‘clear_ti_thread_flag’ 中:
include/linux/thread_info.h:50: 错误: 隐式声明函数 ‘clear_bit’
include/linux/thread_info.h:50: 错误: 提领指向不完全类型的指针
include/linux/thread_info.h: 在顶层:
include/linux/thread_info.h:53: 警告: ‘struct thread_info’ 在形参表内部声明
include/linux/thread_info.h: 在函数 ‘test_and_set_ti_thread_flag’ 中:
include/linux/thread_info.h:55: 错误: 隐式声明函数 ‘test_and_set_bit’
include/linux/thread_info.h:55: 错误: 提领指向不完全类型的指针
include/linux/thread_info.h: 在顶层:
include/linux/thread_info.h:58: 警告: ‘struct thread_info’ 在形参表内部声明
include/linux/thread_info.h: 在函数 ‘test_and_clear_ti_thread_flag’ 中:
include/linux/thread_info.h:60: 错误: 隐式声明函数 ‘test_and_clear_bit’
include/linux/thread_info.h:60: 错误: 提领指向不完全类型的指针
include/linux/thread_info.h: 在顶层:
include/linux/thread_info.h:63: 警告: ‘struct thread_info’ 在形参表内部声明
include/linux/thread_info.h: 在函数 ‘test_ti_thread_flag’ 中:
include/linux/thread_info.h:65: 错误: 隐式声明函数 ‘test_bit’
include/linux/thread_info.h:65: 错误: 提领指向不完全类型的指针
在包含自 include/linux/seqlock.h:29 的文件中,
从 include/linux/time.h:8,
从 include/linux/stat.h:60,
从 include/linux/module.h:10,
从 /home/yxdtiger/hello.c:1:
include/linux/spinlock.h:333:24: 错误: asm/atomic.h:No such file or directory
In file included from include/linux/seqlock.h:29,
from include/linux/time.h:8,
from include/linux/stat.h:60,
from include/linux/module.h:10,
from /home/yxdtiger/hello.c:1:
include/linux/spinlock.h: 在顶层:
include/linux/spinlock.h:339: 错误: expected ‘)’ before ‘*’ token
In file included from include/linux/time.h:8,
from include/linux/stat.h:60,
from include/linux/module.h:10,
from /home/yxdtiger/hello.c:1:
include/linux/seqlock.h: 在函数 ‘read_seqbegin’ 中:
include/linux/seqlock.h:89: 错误: 隐式声明函数 ‘smp_rmb’
In file included from include/linux/stat.h:60,
from include/linux/module.h:10,
from /home/yxdtiger/hello.c:1:
include/linux/time.h: 在顶层:
include/linux/time.h:14: 错误: expected specifier-qualifier-list before ‘time_t’
include/linux/time.h:20: 错误: expected specifier-qualifier-list before ‘time_t’
include/linux/time.h: 在函数 ‘timespec_equal’ 中:
include/linux/time.h:43: 错误: ‘const struct timespec’ 没有名为 ‘tv_sec’ 的成员
include/linux/time.h:43: 错误: ‘const struct timespec’ 没有名为 ‘tv_sec’ 的成员
include/linux/time.h:43: 错误: ‘const struct timespec’ 没有名为 ‘tv_nsec’ 的成员
include/linux/time.h:43: 错误: ‘const struct timespec’ 没有名为 ‘tv_nsec’ 的成员
include/linux/time.h: 在函数 ‘timespec_compare’ 中:
include/linux/time.h:53: 错误: ‘const struct timespec’ 没有名为 ‘tv_sec’ 的成员
include/linux/time.h:53: 错误: ‘const struct timespec’ 没有名为 ‘tv_sec’ 的成员
include/linux/time.h:55: 错误: ‘const struct timespec’ 没有名为 ‘tv_sec’ 的成员
include/linux/time.h:55: 错误: ‘const struct timespec’ 没有名为 ‘tv_sec’ 的成员
include/linux/time.h:57: 错误: ‘const struct timespec’ 没有名为 ‘tv_nsec’ 的成员
include/linux/time.h:57: 错误: ‘const struct timespec’ 没有名为 ‘tv_nsec’ 的成员
include/linux/time.h: 在函数 ‘timeval_compare’ 中:
include/linux/time.h:62: 错误: ‘const struct timeval’ 没有名为 ‘tv_sec’ 的成员
include/linux/time.h:62: 错误: ‘const struct timeval’ 没有名为 ‘tv_sec’ 的成员
include/linux/time.h:64: 错误: ‘const struct timeval’ 没有名为 ‘tv_sec’ 的成员
include/linux/time.h:64: 错误: ‘const struct timeval’ 没有名为 ‘tv_sec’ 的成员
include/linux/time.h:66: 错误: ‘const struct timeval’ 没有名为 ‘tv_usec’ 的成员
include/linux/time.h:66: 错误: ‘const struct timeval’ 没有名为 ‘tv_usec’ 的成员
include/linux/time.h: 在顶层:
include/linux/time.h:73: 错误: expected declaration specifiers or ‘...’ before ‘time_t’
include/linux/time.h: 在函数 ‘timespec_sub’ 中:
include/linux/time.h:82: 错误: ‘struct timespec’ 没有名为 ‘tv_sec’ 的成员
include/linux/time.h:82: 错误: ‘struct timespec’ 没有名为 ‘tv_sec’ 的成员
include/linux/time.h:83: 错误: ‘struct timespec’ 没有名为 ‘tv_nsec’ 的成员
include/linux/time.h:83: 错误: ‘struct timespec’ 没有名为 ‘tv_nsec’ 的成员
include/linux/time.h:83: 错误: 提供给函数 ‘set_normalized_timespec’ 的实参太多
include/linux/time.h: 在顶层:
include/linux/time.h:133: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘timespec_to_ns’
include/linux/time.h:145: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘timeval_to_ns’
include/linux/time.h:157: 警告: 在 ‘s64’ 的声明中,类型默认为 ‘int’
include/linux/time.h:157: 错误: expected ‘;’, ‘,’ or ‘)’ before ‘nsec’
include/linux/time.h:165: 警告: 在 ‘s64’ 的声明中,类型默认为 ‘int’
include/linux/time.h:165: 错误: expected ‘;’, ‘,’ or ‘)’ before ‘nsec’
include/linux/time.h:172: 错误: expected declaration specifiers or ‘...’ before ‘u64’
include/linux/time.h: 在函数 ‘timespec_add_ns’ 中:
include/linux/time.h:174: 错误: ‘ns’ 未声明 (在此函数内第一次使用)
include/linux/time.h:174: 错误: (即使在一个函数内多次出现,每个未声明的标识符在其
include/linux/time.h:174: 错误: 所在的函数内只报告一次。)
include/linux/time.h:174: 错误: ‘struct timespec’ 没有名为 ‘tv_nsec’ 的成员
include/linux/time.h:177: 错误: ‘struct timespec’ 没有名为 ‘tv_sec’ 的成员
include/linux/time.h:179: 错误: ‘struct timespec’ 没有名为 ‘tv_nsec’ 的成员
In file included from include/linux/module.h:10,
from /home/yxdtiger/hello.c:1:
include/linux/stat.h: 在顶层:
include/linux/stat.h:63: 错误: expected specifier-qualifier-list before ‘u64’
在包含自 include/linux/kmod.h:23 的文件中,
从 include/linux/module.h:13,
从 /home/yxdtiger/hello.c:1:
include/linux/errno.h:4:23: 错误: asm/errno.h:No such file or directory
In file included from include/linux/module.h:13,
from /home/yxdtiger/hello.c:1:
include/linux/kmod.h: 在函数 ‘request_module’ 中:
include/linux/kmod.h:33: 错误: ‘ENOSYS’ 未声明 (在此函数内第一次使用)
include/linux/kmod.h: 在函数 ‘call_usermodehelper’ 中:
include/linux/kmod.h:74: 错误: ‘ENOMEM’ 未声明 (在此函数内第一次使用)
include/linux/kmod.h: 在函数 ‘call_usermodehelper_keys’ 中:
include/linux/kmod.h:86: 错误: ‘ENOMEM’ 未声明 (在此函数内第一次使用)
在包含自 include/linux/module.h:14 的文件中,
从 /home/yxdtiger/hello.c:1:
include/linux/elf.h:6:21: 错误: asm/elf.h:No such file or directory
In file included from include/linux/module.h:14,
from /home/yxdtiger/hello.c:1:
include/linux/elf.h: 在顶层:
include/linux/elf.h:18: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘Elf32_Addr’
include/linux/elf.h:19: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘Elf32_Half’
include/linux/elf.h:20: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘Elf32_Off’
include/linux/elf.h:21: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘Elf32_Sword’
include/linux/elf.h:22: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘Elf32_Word’
include/linux/elf.h:25: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘Elf64_Addr’
include/linux/elf.h:26: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘Elf64_Half’
include/linux/elf.h:27: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘Elf64_SHalf’
include/linux/elf.h:28: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘Elf64_Off’
include/linux/elf.h:29: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘Elf64_Sword’
include/linux/elf.h:30: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘Elf64_Word’
include/linux/elf.h:31: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘Elf64_Xword’
include/linux/elf.h:32: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘Elf64_Sxword’
include/linux/elf.h:126: 错误: expected specifier-qualifier-list before ‘Elf32_Sword’
include/linux/elf.h:134: 错误: expected specifier-qualifier-list before ‘Elf64_Sxword’
include/linux/elf.h:149: 错误: expected specifier-qualifier-list before ‘Elf32_Addr’
include/linux/elf.h:154: 错误: expected specifier-qualifier-list before ‘Elf64_Addr’
include/linux/elf.h:159: 错误: expected specifier-qualifier-list before ‘Elf32_Addr’
include/linux/elf.h:165: 错误: expected specifier-qualifier-list before ‘Elf64_Addr’
include/linux/elf.h:171: 错误: expected specifier-qualifier-list before ‘Elf32_Word’
include/linux/elf.h:180: 错误: expected specifier-qualifier-list before ‘Elf64_Word’
include/linux/elf.h:193: 错误: expected specifier-qualifier-list before ‘Elf32_Half’
include/linux/elf.h:210: 错误: expected specifier-qualifier-list before ‘Elf64_Half’
include/linux/elf.h:232: 错误: expected specifier-qualifier-list before ‘Elf32_Word’
include/linux/elf.h:243: 错误: expected specifier-qualifier-list before ‘Elf64_Word’
include/linux/elf.h:288: 错误: expected specifier-qualifier-list before ‘Elf32_Word’
include/linux/elf.h:301: 错误: expected specifier-qualifier-list before ‘Elf64_Word’
include/linux/elf.h:362: 错误: expected specifier-qualifier-list before ‘Elf32_Word’
include/linux/elf.h:369: 错误: expected specifier-qualifier-list before ‘Elf64_Word’
include/linux/elf.h:374:5: 警告: “ELF_CLASS”未定义
include/linux/elf.h:396: 错误: expected declaration specifiers or ‘...’ before ‘loff_t’
In file included from include/linux/kobject.h:24,
from include/linux/module.h:16,
from /home/yxdtiger/hello.c:1:
include/linux/sysfs.h:30: 错误: expected specifier-qualifier-list before ‘mode_t’
include/linux/sysfs.h:64: 错误: expected specifier-qualifier-list before ‘size_t’
include/linux/sysfs.h:75: 错误: expected specifier-qualifier-list before ‘ssize_t’
include/linux/sysfs.h: 在函数 ‘sysfs_schedule_callback’ 中:
include/linux/sysfs.h:122: 错误: ‘ENOSYS’ 未声明 (在此函数内第一次使用)
include/linux/sysfs.h: 在顶层:
include/linux/sysfs.h:153: 错误: expected declaration specifiers or ‘...’ before ‘mode_t’
In file included from include/linux/kobject.h:27,
from include/linux/module.h:16,
from /home/yxdtiger/hello.c:1:
include/linux/kref.h:24: 错误: expected specifier-qualifier-list before ‘atomic_t’
在包含自 include/linux/kobject.h:29 的文件中,
从 include/linux/module.h:16,
从 /home/yxdtiger/hello.c:1:
include/linux/wait.h:26:25: 错误: asm/current.h:No such file or directory
In file included from include/linux/module.h:16,
from /home/yxdtiger/hello.c:1:
include/linux/kobject.h:41: 错误: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘uevent_seqnum’
include/linux/kobject.h:228: 错误: expected specifier-qualifier-list before ‘ssize_t’
include/linux/kobject.h:256: 错误: expected declaration specifiers or ‘...’ before ‘size_t’
include/linux/kobject.h: 在函数 ‘kobject_action_type’ 中:
include/linux/kobject.h:258: 错误: ‘EINVAL’ 未声明 (在此函数内第一次使用)
在包含自 /home/yxdtiger/hello.c:1 的文件中:
include/linux/module.h:19:23: 错误: asm/local.h:No such file or directory
include/linux/module.h:21:24: 错误: asm/module.h:No such file or directory
In file included from /home/yxdtiger/hello.c:1:
include/linux/module.h: 在顶层:
include/linux/module.h:49: 错误: expected specifier-qualifier-list before ‘ssize_t’
include/linux/module.h: 在函数 ‘lookup_module_symbol_name’ 中:
include/linux/module.h:529: 错误: ‘ERANGE’ 未声明 (在此函数内第一次使用)
include/linux/module.h: 在函数 ‘lookup_module_symbol_attrs’ 中:
include/linux/module.h:534: 错误: ‘ERANGE’ 未声明 (在此函数内第一次使用)
include/linux/module.h: 在函数 ‘module_get_kallsym’ 中:
include/linux/module.h:541: 错误: ‘ERANGE’ 未声明 (在此函数内第一次使用)
make[2]: *** [/home/yxdtiger/hello.o] 错误 1
make[1]: *** [_module_/home/yxdtiger] 错误 2
make[1]: Leaving directory `/usr/src/linux-2.6.24.4'
make: *** [all] 错误 2