03.1 (conspect) The MultifileCompiling
The MultifileCompiling
Sometimes the compilation requires the assembly of multiple files.
You can redirect threads before the execution operation. if we want to redirect standard output, we say which one should do it. Three strategies for placing variables:
- Register
- Registry
- Stack
Unlike assembler, the C program does not start with main.
First, you need to prepare the memory, and so on. Only then will main be called.
The easiest way to open a new file is to move the function there, and in another file include it . In this case, the compiler will make one of all the files. The compiler and processor layout make a file in C, then in assembler, and the result is an object file.
Let's imagine that we have a lot of functions. There are static and dynamic memory loads.
First, a static binary file is created and only when the program is started, the binding occurs. When loading, the library will be loaded into memory and we will search for functions from it. How to use another library. We need to run the file where it is located.