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

Linux 重新 rebuild 讨论

  •  
  •   hackingwu ·
    hackingwu · May 19, 2017 · 2989 views
    This topic created in 3460 days ago, the information mentioned may be changed or developed.

    请问有可能针对一个 Linux 的可执行文件,只是 rebuild 其中某部分的代码,用生成的*.o 修改 Linux 的可执行文件,而不是重新 build 生成可执行文件。有这种可行性吗?

    4 replies  •  2017-05-21 22:24:32 +08:00
    xss
    xss
    May 19, 2017
    1
    可以, 但是需要你最终 elf 文件自己解析.o 文件, 搞定重定位等问题.
    也就是说, 你的 elf 完成了编译器的链接阶段.
    choury
    choury
    May 19, 2017
    2
    那这样的话干嘛不用 so 文件呢,用 dl 库加载不就好了
    hitmanx
    hitmanx
    May 19, 2017
    3
    主要是想完成什么样的目的?
    mxi1
    mxi1
    May 21, 2017
    4
    @choury 是啊,这种方式比较靠谱。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   1658 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 30ms · UTC 08:24 · PVG 16:24 · LAX 00:24 · JFK 03:24
    ♥ Do have faith in what you're doing.