Differences between several flags in dlopen

Source: Internet
Author: User

 

Differences between several flags in dlopen: rtld_lazy rtld_now rtld_global

Void * dlopen (const char * filename, int flag );

Flag: rtld_lazy rtld_now rtld_global, which has the following meanings:

1. rtld_lazy: Before dlopen returns, do not parse undefined variables (such as external variables extern or functions) in the dynamic library, the address of this variable is not parsed.

 

2. rtld_now: different from above, he needs to parse the address of each undefined variable before dlopen returns. If the address cannot be parsed, the return value is null in dlopen. The error is:

: Undefined Symbol: XXXX .......

 

3. rtld_global: it means that the definition variables parsed in the library can be used in other subsequent linked libraries.

 

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.