Language Selection

English French German Italian Portuguese Spanish

Getting Familiar with GCC Parameters

Filed under
HowTos

gcc (GNU C Compiler) is actually a collection of frontend tools that does compilation, assembly, and linking. The goal is to produce a ready-to-run executable in a format acceptable to the OS. For Linux, this is ELF (Executable and Linking Format) on x86 (32-bit and 64-bit). But do you know what some of the gcc parameters can do for you? If you're looking for ways to optimize the resulted binary, prepare for a debugging session, or simply observe the steps gcc takes to turn your source code into an executable, getting familiar with these parameters is a must. So, please read on.

Recall that gcc does multiple steps, not just one. Here is a brief explanation of their meaning:

* Preprocessing: Producing code that no longer contains directives. Things like "#if" cannot be understood directly by the compiler, so this must be translated into real code. Macros are also expanded at this stage, making the resulting code larger than the original. [1]

* Compilation:

Full Story.

More in Tux Machines

grep-2.21 released [stable]

This is to announce grep-2.21, a stable release. There have been 94 commits by 3 people in the 25 weeks since 2.20. Read more Also: GNU Parallel 20141122 ('Rosetta') released

SUSE invests in software-defined storage

SUSE, the enterprise Linux company, is working on its own storage solution using open-source Ceph: SUSE Storage. Read more

Linux 3.18-rc6

Steady progress towards final release, although we still have a big unknown worry in a regression that Dave Jones reported and that we haven't solved yet. In the process of chasing that one down, there's been a fair amount of looking at various low-level details, and that found some dubious issues, but no smoking gun yet. But that explains some of the patches in rc6.. Read more

Open Source Code Contains Fewer Defects, But There's a Catch

Research suggests that software developed using open source code contains fewer defects than that built with proprietary code. The catch is that open source code rarely benefits from security teams specifically tasked with looking for bugs. Read more