answersLogoWhite

0

Why is the importance of link section in programming c?

Updated: 8/20/2019
User Avatar

Wiki User

8y ago

Best Answer

Compilation is a three-phase process: preprocessing, compilation and linking.

The preprocessor's job is to prepare a source file (translation unit) for compilation. This is achieved by reading each source file, stripping out the user-comments, performing macro substitutions and acting upon any conditional compilation directives, writing the output to an intermediate file which contains only C code and nothing else. Thus there will be one intermediate file generated for each translation unit.

The compiler's job is to create an object source file from an intermediate file. Object source files primarily consist of a machine code translation of the C source code followed by the symbol tables, which lists all the internal and external linkages of the translation unit. An external linkage is simply a type declaration which is not defined within the current translation unit; the definition may be provided by a type library or it may be provided by another translation unit. Either way, the compiler cannot generate the required machine code, so it uses a symbol (a placeholder) instead.

Once all translation units are compiled to object files, the linker examines the linkage tables and uses that information to generate a single machine code executable from the object source, substituting the placeholders generated by the compiler and adjusting memory offsets to suit the resultant code.

User Avatar

Wiki User

8y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Why is the importance of link section in programming c?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What are the latest information about C programming language?

(link moved to link section) C is moving to embedded & lot more updates, its there on this website


Does C language has a interpreter?

There might be C language interpreters, but they have no or minimal importance in actual programming.


What is link section in c program?

the link section provides instruction to the compiler to the link function from the system library.


How Create mouse in C programming source code?

Here is the article for Mouse programming in C. In this link full details are given nicely.http://electrofriends.com/articles/computer-science/c-tutorials/mouse-programming-in-cc/


Define structure oriented programming language?

A structure oriented language is one, which should the following structure as Documentation Section, Link section, Definition Section, Global declaration section and Functions(including Main functions) in an hierarchical order. This order cannot be interchanged, but structure oriented language like C can have these sections as optional. Correct me if am wrong, Neela.T


C programming language bsc it notes?

different between defining value definition section and defining value declaration section


Programming process of c language?

Write the source program. Compile. Link executable. Run it.


How do you write a program of fast fourier transform in C programming?

This link gives an excellent example of the fast fourier transform in C:


Could you recommend some classic books on C programming?

The industry bible: ( see link below)


What is c and c in computer programming?

C and C++ are both high-level programming languages.


Create a spiral in C programming?

create spiral in c programming?


What is a basic structure of a c programming?

Basic structure of a C program is /* Documentation section */ /* Link section */ /* Definition section */ /* Global declaretion section */ /* Function section */ (return type) (function name) (arguments...) void main() { Declaration part Executable part (statements) } /* Sub-program section */ (return type) (function name 1) (arguments...) (return type) (function name 2) (arguments...) . . . (return type) (function name n) (arguments...) Basic structure of a C program is /* Documentation section */ /* Link section */ /* Definition section */ /* Global declaretion section */ /* Function section */ (return type) (function name) (arguments...) void main() { Declaration part Executable part (statements) } /* Sub-program section */ (return type) (function name 1) (arguments...) (return type) (function name 2) (arguments...) . . . (return type) (function name n) (arguments...)