Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What are the codes such as CC, LD and CC[M] output when compiling the Linux kernel?

While compiling Linux from scratch I realize that there are compile codes that appear while compiling.

For example CC filename , LD filename, CC[M] filename.

What do these codes mean?

like image 641
Mike G Avatar asked Jul 28 '12 02:07

Mike G


People also ask

What is LD in compilation?

Updated: 11/06/2021 by Computer Hope. On Unix-like operating systems, ld is a linker. It combines many compiled object and archive files, relocates their data, and ties up symbol references. Usually, the last step in compiling a program is to run ld.

What is CC in compiling?

CC is the name given to the UNIX Compiler Command. It is used as the default compiler command for your operating system and also is executable with the same command. GCC, on the other hand, is the GNU Compiler operating system.

What is M in Makefile?

The M= option causes that makefile to move back into your module source directory before trying to build the modules target.


1 Answers

The different markings specify the following

  • [CC] - Compiles the C file into an designated object file. The object file contains the archicture assembler code of that .c file. As it might also reference parts outside its scope. For example calling another function in another .c file. The function calls are left open within the object file, which is later included by the linker. Therefore
  • [LD] is the proces of linking the compiled objects together, and wire up the function calls that has been left open by the compiler. However, many parts are linked together as the core part of the kernel, while some parts are left out. And thus you see
  • [CC (M)] for those parts which are compiled as points to be loaded into the kernel at runtime. But which are not linked together in the monolithic part of the kernel. But instead can be inserted when the kernel is booted.
like image 196
Matias Bjørling Avatar answered Nov 02 '22 19:11

Matias Bjørling