Long time no write, z recent various things tangled .... The balance seat can't afford to hurt ...
Go to the point, recently encountered Linux under different glibc gcc incompatibility problem, in order to make the high version of GCC glibc not dependent on the host environment, did a series of work, the results are satisfactory, simple record
The problem solution for the glibc version is to pull the glibc library out and publish it with the executable file.
Dynamic linker is disgusting, because it is written dead in the Elf file, in order to let him run on another machine, need to modify
There are two main ways to modify the current 1 compile time
-wl,-dynamic-linker
Google, found an artifact ...
Patchelf Grand Appearance
Https://nixos.org/patchelf.html
There is a detailed description, very strong do not explain ....
In addition two articles referenced during the period:
Https://www.sunchangming.com/blog/post/4122.html
http://chenyufei.info/blog/2012-09-14/packaging-linux-applications/
Interested in dynamic connectors can look at the self-cultivation of the programmer ... >>
Linux modifies the dynamic linker and rpath of elf files