• 请不要在回答技术问题时复制粘贴 AI 生成的内容
guanyin8cnq12
V2EX  ›  程序员

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

  •  
  •   guanyin8cnq12 · Jun 23, 2021 · 2677 views
    This topic created in 1809 days ago, the information mentioned may be changed or developed.
    [ 1854.285430] nfs: module PLT section(s) missing
    [ 1854.317509] nfs: module PLT section(s) missing

    请问 如何解决.
    Supplement 1  ·  Jun 24, 2021
    /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
    Supplement 2  ·  Jun 28, 2021
    使用 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 replies    2021-06-24 08:46:34 +08:00
    guanyin8cnq12
        1
    guanyin8cnq12  
    OP
       Jun 23, 2021
    for armv7 多核
    tty1
        2
    tty1  
       Jun 24, 2021
    把 NFS 的 PLT 这个模组加上就可以吧
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2708 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 33ms · UTC 02:04 · PVG 10:04 · LAX 19:04 · JFK 22:04
    ♥ Do have faith in what you're doing.