V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
guanyin8cnq12
V2EX  ›  程序员

Linux kernel 4.4 模块编译 提示 module PLT section(s) missing

  •  
  •   guanyin8cnq12 · 2021-06-23 23:37:38 +08:00 · 1986 次点击
    这是一个创建于 1035 天前的主题,其中的信息可能已经有所发展或是发生改变。
    [ 1854.285430] nfs: module PLT section(s) missing
    [ 1854.317509] nfs: module PLT section(s) missing

    请问 如何解决.
    第 1 条附言  ·  2021-06-24 21:52:11 +08:00
    /linux-4.4.197/scripts/module-common.lds
    sections 里 添加

    .plt : { BYTE(0) }
    .init.plt : { BYTE(0) }

    编译后, 检查
    [root@haproxy persist-root-shell]# objdump -t getshell.ko | grep plt
    00000024 l d .plt 00000000 .plt
    00000025 l d .init.plt 00000000 .init.plt
    第 2 条附言  ·  2021-06-28 15:29:03 +08:00
    使用 grep -rn '.plt : { BYTE(0) }' 查找 linux 4.4.197 源码发现

    arch/arm/kernel/module.lds:2: .core.plt : { BYTE(0) }
    arch/arm/kernel/module.lds:3: .init.plt : { BYTE(0) }
    arch/ia64/module.lds:9: .core.plt : { BYTE(0) }
    arch/ia64/module.lds:10: .init.plt : { BYTE(0) }

    源码是 .core.plt ,改成 .plt 就 ok 了 。
    2 条回复    2021-06-24 08:46:34 +08:00
    guanyin8cnq12
        1
    guanyin8cnq12  
    OP
       2021-06-23 23:52:04 +08:00
    for armv7 多核
    tty1
        2
    tty1  
       2021-06-24 08:46:34 +08:00
    把 NFS 的 PLT 这个模组加上就可以吧
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   1296 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 17:46 · PVG 01:46 · LAX 10:46 · JFK 13:46
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.