[GCC]-GNU Compiler Collection
I do not know who this image corresponds to, but I give them the corresponding copyright in this paragraph.

[GCC]-GNU Compiler Collection

"Or as I call it ... (the machine translator)

Formally, the name "compiler" is used primarily for programs that translate source code from a high-level programming language to a lower-level language to create an executable program.

And those who were confused like me at first will wonder ... what is high and low level programming?

Well, it's very easy, high-level programming is what programmers or users understand and develop, and low-level programming is programming that only the machine understands.

That is why for me the compilation is the translator from human language to machine language, being the intermediary of a good communication with our hardware.

Example: Google translate is the ideal tool between two people who do not know the other's language and want to engage in a fluent conversation.

But for our machines to understand us, our code performs a specific route that we must understand to better convey the message to the low-level programming receiver.

let's see a picture of this:

No hay texto alternativo para esta imagen

The route has 4 steps that starts when we already have created our source code, in which they are:

1. Preprocessor: This step "Prepare" or modify the source code before it translated into binary code.

2. Compiler: analyzes the syntax and semantics of the preprocessed source code and translates it

3. Assembler: In this phase the filename.s is taken as input and turned into filename.o by assemble

4. Linker: This is the final phase in which all the linking of function calls with their definitions are done.

No hay texto alternativo para esta imagen

As we can see in the previous image, we have a more graphic explanation of what our compiler does when it is translated from our language to the language of the machines.

And if we look at that image, we see that our file with the source code has changes as it goes through each of the steps.

If you looked again, I hope you noticed that our file underwent changes in its extension in each of the translation processes.

To understand it better, let's build on these extensions and see how they can tell us what step our build file is in.


(file) .c: here our file is in source code

(file) .i - This extension in our file indicates preprocessing, in which it expands our code (although this step for me is like what a text editor does from a book, since you must first make some corrections to the text to give a better understanding of what to read)

(file) .s: Here the extension of our file goes from being a human readable code format to (file) .o, which is a compiled object format

(file) .out - And finally, on this part of the way to a big build, we end up with an extension of our file which is a compiled executable format.

Now I hope that with these basic concepts already clear, you will try a little of this excellent tool and are willing to investigate more.

Best regards, Laura.




To view or add a comment, sign in

More articles by Laura Caicedo (She/Her/Hers)

  • Python - Everything is an object

    🌻 Contents Introducción Id and type Mutable objects Immutable objects Why does it matter and how differently does…

Others also viewed

Explore content categories