简体   繁体   中英

What is linker, compiler, assembler and elaborator in an IDE like CodeBlocks?

IDE consists of a linker, compiler, assembler, and elaborator. I want to know about them as follow:

  • What is their relation?
  • How they are connected?
  • What are their roles?
  • Their preference.

If possible, what is linker scripts?

Someone, please help me with graphics. Thanks in advance.

A compiler and an assembler take as input source code and produce object code files in machine language (the binary form of the CPU instructions). The main difference is that a compiler takes source code written in a high level language such as C/C++, meanwhile, an assembler takes source code written in the particular assembly language of your target architecture (the CPU where your code will run). But some compilers, can output assembly text that is then fed as the input to an assembler.

A linker takes these object code files together and produces the final executable (or library). Although some compilers/assemblers don't have an external linker since linking is internally performed by them.

A linker script is, in a broad sense, a sort of configuration file that tells the linker the details for how to combine the object files.

An elaborator or editor is where you type the source code, it is commonly integrated into IDEs such as CodeBlocks and Visual Studio.

Their relationship is as follows: Editor -> Compiler or Assembler -> Linker (Configured by linker script) -> Final executable or library .

They don't have any preference . They do what they do, they don't get to choose, we tell them what to do.

See this post , and google "Linker scripts" for more info on them and examples.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM