错误如下:
解决方法1: 打开Makefile,找到下面这一行
fs/binfmt_aout.c: In function 'load_aout_binary':
fs/binfmt_aout.c:271: error: 'SEGMENT_SIZE' undeclared (first use in this function)
fs/binfmt_aout.c:271: error: (Each undeclared identifier is reported only once
fs/binfmt_aout.c:271: error: for each function it appears in.)
make[1]: *** [fs/binfmt_aout.o] 错误 1
解决方法1: 打开Makefile,找到下面这一行
NOSTDINC_FLAGS +=
-nostdinc
-isystem $
(shell $
(CC
)
-print-file-name=include
)
改成
NOSTDINC_FLAGS +=
-nostdinc
-isystem $
(shell $
(CC
)
-print-file-name=include
)
-Dlinux
接着执行编译命令 and(and这个命令在上一节中讲过,为自定义的命令)
出现这个错误是因为在fs/binfmt_aout.c中,引用的宏SEGMENT_SIZE在include/linux/a.out.h中定义。
它的值取决于宏定义linux, 如果定义过linux才会有SEGMENT_SIZE
解决方法2:修改config文件。
Userspace binary formats --->
Kernel support for a.out and ECOFF binaries 这项去掉就可以了