如何从 Linux 中共享库的符号依赖项 table 中剥离符号版本信息?

How to strip symbol version information from the symbol dependency table of a shared library in Linux?

我需要一种方法从 Linux 中共享库的符号依赖项 table 中剥离(或更改,如果不可能剥离)符号版本信息,这样我就可以变通了memcpy@GLIBC_2.14 灾难,所以我可以让我的二进制文件在 Linuxes 上再次使用 glibc 早于 2.14。

有什么工具吗?

注意:__asm__('.symver') 指令对我不起作用,因为问题不是 my 库使用 memcpy,而是我的库使用 libgcc 和that 使用 memcpy@GLIBC_2.14,这就是为什么我需要一个工具来更改 after 编译。 谢谢

I need a way to strip (or change, if stripping is not possible) the symbol version information from the symbol dependency table of a shared library in Linux, so I can work around the memcpy@GLIBC_2.14 disaster,

剥离符号版本信息

  • 如果不在链接二进制文件中重建大量内部 ELF 结构是不可能的(即在实践中不可能)并且
  • (即使您成功了)也不会生成适用于旧版 GLIBC 的二进制文件。

so I can make my binaries work on Linuxes with glibc older than 2.14 again.

您可以找到 "build on newer system, run on older one" here 的方法。