unsupported relocation type: r_x86_64_plt32 (4)

在Ubuntu 18.04.2 LTS 系统中编译linux-4.0内核代码。报错:

Unsupported relocation type: R_X86_64_PLT32 (4)
arch/x86/boot/compressed/Makefile:70: recipe for target 'arch/x86/boot/compressed/vmlinux.relocs' failed
make[2]: *** [arch/x86/boot/compressed/vmlinux.relocs] Error 1
arch/x86/boot/Makefile:111: recipe for target 'arch/x86/boot/compressed/vmlinux' failed
make[1]: *** [arch/x86/boot/compressed/vmlinux] Error 2
arch/x86/Makefile:231: recipe for target 'bzImage' failed
make: *** [bzImage] Error 2

解决方案可参考如下链接:

x86: Treat R_X86_64_PLT32 as R_X86_64_PC32

将对应文件加上对应的代码,重新编译即可。

,如果出现如下错误:

/bin/sh: 1: lz4c: not found
arch/x86/boot/compressed/Makefile:86: recipe for target 'arch/x86/boot/compressed/vmlinux.bin.lz4' failed
make[2]: *** [arch/x86/boot/compressed/vmlinux.bin.lz4] Error 1
arch/x86/boot/Makefile:111: recipe for target 'arch/x86/boot/compressed/vmlinux' failed
make[1]: *** [arch/x86/boot/compressed/vmlinux] Error 2
arch/x86/Makefile:231: recipe for target 'bzImage' failed

sudo apt-get install liblz4-tool

如果遇到其他错误可参考如下链接:

gcc-9编译Linux 3.14.0内核问题汇总

  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值