Linux2.6.38内核编译报错

本文解决了一个在编译2.6.38内核时遇到的错误,涉及到arch/x86/kernel/entry_32.S文件中的特定修改。通过应用补丁或自行修改文件中指定的部分可以成功解决问题。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

编译2.6.38内核报错:

arch/x86/kernel/entry_32.S: Assembler messages:

arch/x86/kernel/entry_32.S:1422: Error: .size expression for apf_page_fault does not evaluate to a constant
make[2]: *** [arch/x86/kernel/entry_32.o] 错误 1
make[1]: *** [arch/x86/kernel] 错误 2

make: *** [arch/x86] 错误 2


解决办法为:

这个跟内核的一个bug有关。已经有人提交了patch了。
自己也可以改一下 arch/x86/kernel/entry_32.S 中的两处地方再编译,具体请参考链接:
https://lkml.org/lkml/2011/3/20/49

This fixes the problem. The file does not have a maintainer listed, so 
I don't know where else to send it than to the LKML. Please correct 
me or redirect as needed.

- --- entry_32.S.original        2011-03-18 08:21:51.000000000 -0400
+++ entry_32.S        2011-03-20 10:37:00.000000000 -0400
@@ -343,7 +343,7 @@
                                        # int/exception return?
        jne work_pending
        jmp restore_all
- -END(ret_from_exception)
+END(resume_userspace)

#ifdef CONFIG_PREEMPT
ENTRY(resume_kernel)
@@ -1413,7 +1413,7 @@
        CFI_ADJUST_CFA_OFFSET 4
        jmp error_code
        CFI_ENDPROC
- -END(apf_page_fault)
+END(async_page_fault)


参考网址:

http://bbs.chinaunix.net/thread-3602662-1-1.html


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值