zoukankan      html  css  js  c++  java
  • Can't find kernel text map area from kcore

    kernel : 4.9.51
    kexec-tools : 2.0.4

    1.~ # ./kexec -p /boot/vmlinuz --initrd=/boot/initrd --command-line="`cat /proc/cmdline` irqpoll maxcpus=1 reset_devices"
    Unhandled rela relocation: R_X86_64_31
    原因:
        #x86_64
        export CFLAGS=-fPIC

    2. # /sbin/kexec -p /boot/vmlinuz --initrd=/boot/initrd --command-line="`cat /proc/cmdline` irqpoll maxcpus=1 reset_devices"
        
    Can't find kernel text map area from kcore
    Cannot load /boot/vmlinuz

     kexec-tools fixes for 4.9+ kernels

    Current fc25 kernel version is v4.10.

    4.9+ kernel has phys_base virtual address in vmcoreinfo rather it's
    symbol address. Therefore, backport makedumpfile patch "Adapt code to
    get value of phys_base"

    While doing that, also backport "kexec-tools/x86:
    get_kernel_vaddr_and_size off-by-one fix" to fix following with kexec
    -p:
     "Can't find kernel text map area from kcore"

    v4.11 kernel will have another fix for kcore ( 464920104bf7 /proc/kcore:
    update physical address for kcore ram and text)which allows only valid
    physical address to pass in PT_LOAD.With that fix in kernel, kexec-tools
    may not work always until we backport "build_mem_phdrs(): check if
    p_paddr is invalid" from kexec-tools. Since there does not seem any side
    effect of taking that kexec-tools commit even for v4.10 because
    "phdr->p_paddr != (unsigned long long)-1" will always be TRUE for them,
    therefore we take that kexec-tools patch as well.
    https://github.com/pratyushanand/kexec-tools/commit/2c8ce09f420fb0f1c3b4d700dc00f3a4ffbf94f5


    解法:升级到kexec-tools-2.0.15


  • 相关阅读:
    【2021-01-07】叫我“何工”就好
    2021年的 目标计划
    转:我在拼多多的三年 https://www.leadroyal.cn/?p=1228#more-1228
    匀强电场等效重力场
    开源图片素材管理软件-civet
    心学#传习录学习
    工作感受月记202101月
    统计字典序元音字符的数量
    可被5整除的二进制
    假期刷题--JAVA
  • 原文地址:https://www.cnblogs.com/mull/p/7803798.html
Copyright © 2011-2022 走看看