Linux Programming Dynamic Library knowledge

Source: Internet
Author: User

= = = Dynamic Library Description = = =
1. Library name format: Lib + the_name_of_library +. So + version_number
Exp:libc.so.6
2.ldconfig typically creates soname, but does not create linker name (libname.so), which is typically created when the library is installed
3. Temporarily add dynamic Library directory Ld_library_path, commonly used for testing and development
4.ld_preload Pre-load library. For pre-loading, emergency use, or special test conditions
5. Create a dynamic library
Gcc-fpic-shared-wl,-soname, Your_soname-o library_name \
File_list library_list
6.ldconfig Loading Directory Order
Executed in the order of the configuration directory
Encountered include ld.so.conf.d/*.conf, the order of these configurations sorted alphabetically
7. When compiling a program or library, the. o file will be included in the program or library, and the dynamic library will not, if encountered
Undefined symbol, the search symbol is to find the library from left to right, until it is found, the search is stateless and does not
Records what symbols are found, so it is generally recommended. o before the compilation options, so files are placed in the back, followed by
Dependency order Placement: The dependent object is placed on the right side of the dependent object

Linux Programming Dynamic Library knowledge

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.