Various types of files under Linux

Source: Internet
Author: User

. A files are static link library files. A static link is a link to a function or procedure to be called into an executable file, as part of an executable file. When multiple programs call the same function, multiple copies of the function are present in memory, wasting valuable memory resources. A file is a combination of multiple. o files.

The. So file is a shared library file (dynamic link). The function code called by the dynamic link is not copied to the application's executable file, but is simply added to the description of the called function (which is often the relocation information). The link relationship between the application and the corresponding. So is established only when the application is loaded into memory and starts running under the management of the operating system.

The. o file is an object file that contains the instructions that are executed by the 01 machine, and links are required when the program executes. The link is to chain multiple. o files into an executable file.

. Texi

.def module definition file She is a text file. It is used to export a DLL's function, __declspec (dllexport) is similar, but the. def file is not defined by Microsoft. There are only two required parts in a. def file: LIBRARY and exports. Let's first look at a basic. def file that I'll parse later.
LIBRARY dll_tutorial
DESCRIPTION "Our simple DLL"
exports
        Add @1
        Function @2
The first line, ' LIBRARY ' is a required part. It tells the linker (linker) How to name your DLL. The section below that is identified as ' DESCRIPTION ' is not required, but I like to put it in. The statement writes a string to the. Rdata section [according to MSDN], it tells people who might use this DLL, what this DLL does or what it is for (presence). The following section identifies the "exports" as another required part; This section allows the function to be accessed by other applications and it creates an import library. When you build this project, not only a. dll file is created, but an export library with a file extension of. Lib is also created. In addition to the previous section, there are four other parts identified as: NAME, Stacksize,sections, and VERSION. In. def a semicolon (;) start an annotation

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.