Linux modifies the dynamic linker and rpath of elf files

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.