-1

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.

KittoMi
  • 411
  • 5
  • 19
  • 2
    I've never heard the word "elaborator" used to describe part of a dev env. Perhaps you mean "editor"? – Peter Cordes Oct 28 '19 at 03:38
  • 1
    Your question is very broad and generic (and you should look up the words ["linker"](https://en.wikipedia.org/wiki/Linker_(computing)), ["compiler"](https://en.wikipedia.org/wiki/Compiler), etc. on wikipedia), except for the part about linker scripts. That's a very specific thing which you don't normally use unless you need to override the linker defaults of how to lay out section / segments in an executable. e.g. for building a bootable kernel. – Peter Cordes Oct 28 '19 at 03:40
  • @KittoMi There is no need for graphics to answer your question. Can you accept a verbal answer? – Javier Silva Ortíz Oct 28 '19 at 03:47
  • @JavierSilvaOrtíz You are most welcome for a verbal answer. – KittoMi Oct 28 '19 at 04:10

1 Answers1

3

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.

Javier Silva Ortíz
  • 2,864
  • 1
  • 12
  • 21
  • 2
    Depending on the compiler (for example GCC), it might only output assembly text and run that through the assembler. Other compilers go straight to machine code unless you ask them to output asm. – Peter Cordes Oct 28 '19 at 04:49