Skip to content
July 7, 2026
  • Linkedin
  • Twitter
  • Facebook
  • Youtube

Daily CyberSecurity

Zero-hour alerts. Unmatched analysis.

Primary Menu
  • Home
  • CVE Watchtower
  • Cyber Criminals
  • Data Leak
  • Linux
  • Malware
  • Vulnerability
  • Submit Press Release
  • Vulnerability Report
Light/Dark Button
  • Home
  • Linux
  • How to Use GCC/G++ compiler: Pre-Processing,Compiling,Assembling,Linking
  • Linux
  • Technique

How to Use GCC/G++ compiler: Pre-Processing,Compiling,Assembling,Linking

Do Son August 4, 2017 2 minutes read

Gcc

GCC (GNU Compiler Collection, GNU Compiler Suite), is a set of GNU developed by the programming language compiler. It is a free software released by the GPL and LGPL licenses and a key part of the GNU program and is the standard compiler for free Unix and Apple Mac OS X operating systems. GCC (especially the C language compiler) is also often considered a de facto standard for cross-platform compilers.

Usage

Example code: hello.c

#include <stdio.h>

int main()
{
printf("hello world!\n");
return 0;
}

Compile

gcc hello.c -o hello

./hello

In essence, the compilation process is divided into four stages, namely Preprocessing, Compilation, Assembly, and Linking.

Preprocessing

gcc’s -E option allows the compiler to stop after preprocessing and output the preprocessing results. In this case, the result of the preprocessing is to insert the contents of the stdio.h file into hello.c.

Compilation

After preprocessing, you can compile the generated hello.i file directly and generate the assembly code:
gcc -S hello.i -o hello.s

-S Compile only; do not assemble or link
-o <file> Place the output into <file>

Assembly

For the assembly code file test.s generated in the previous section, the gas assembler is responsible for compiling it as an object file, as follows:
gcc -c hello.s -o hello.o

Linking

The gcc connector is provided by gas and is responsible for linking the target file of the program to all the additional target files needed to eventually generate the executable file. Additional target files include static link libraries and dynamic link libraries.

For the hello.o generated in the previous section, connect it to the C standard input and output library, and finally generate the hello program

gcc hello.o -o hello

G++

The Compile process

Pre-Processing

g++  -E  hello.cpp  -o  hello.i

Compiling

g++  -S  hello.i  -o   hello.s

Assembling

g++  -c  hello.s  -o  hello.o

Linking

g++  hello.o  -o  hello

 

Share this article:

Facebook Post LinkedIn Telegram
Written by
@DdoS · Security Researcher

Do Son

Do Son is the Founder and Editor of SecurityOnline.info. Working in cybersecurity since 2013, he reports on vulnerabilities, malware, and emerging threats, providing timely analysis to help organizations and individuals stay ahead of evolving risks.

Tags: Assembling Compiling Linking Pre-Processing

Search

Translation

CVE WATCHTOWER
🚨

Receive alerts for vulnerabilities being exploited in the wild.

⚡

Get notified instantly when a Proof of Concept (PoC) exploit is published.

🔍

Access critical info on vulnerabilities even when marked as "RESERVED".

🧠

Insights powered by decades of expertise and global intelligence sources.

🎯

Customize alerts with up to 10 keywords for your specific tech stack.

📊

Export the raw CVE database for SIEM integration and reporting.

Upgrade Package

🚨 Active Exploits in the Wild

  • CVE-2026-20896CVSS 9.8
    Gitea Docker image: `REVERSE_PROXY_TRUSTED_PROXIES = *` default lets any source IP impersonate any user via `X-WEBAUTH-USER`
    Admin intel📅 Updated: Jul 6, 2026
  • CVE-2026-48282CVSS 10.0
    ColdFusion versions 2025.9, 2023.20 and earlier are affected by an Improper Limitation of a Pathname to a Restricted...
    Admin intel📅 Updated: Jul 3, 2026
  • CVE-2024-14037CVSS 9.8
    Redsea Cloud eHR contains an arbitrary file upload vulnerability that allows unauthenticated attackers to achieve remote code execution...
    Admin intel📅 Updated: Jul 3, 2026
  • CVE-2026-8451CVSS 8.8
    Insufficient input validation in NetScaler ADC and NetScaler Gateway leading to memory overread if NetScaler ADC or NetScaler Gateway is configured...
    Admin intel📅 Updated: Jul 2, 2026
  • CVE-2026-8037CVSS 9.6
    OS Command Injection Remote Code Execution Vulnerability in API in Progress ADC Products allows an un-authenticated attacker to...
    Admin intel📅 Updated: Jul 1, 2026
  • CVE-2026-45659CVSS 8.8
    Deserialization of untrusted data in Microsoft Office SharePoint allows an authorized attacker to execute code over a network.
    CISA KEV📅 Added to KEV: Jul 1, 2026
  • CVE-2026-48558CVSS 10.0
    SimpleHelp versions 5.5.15 and prior and 6.0 pre-release versions contain an authentication bypass vulnerability in the OIDC authentication...
    Admin intelCISA KEV📅 Added to KEV: Jun 29, 2026📅 Updated: Jun 29, 2026
  • CVE-2026-46817CVSS 9.8
    Vulnerability in the Oracle Payments product of Oracle E-Business Suite (component: File Transmission). Supported versions that are affected...
    Admin intel📅 Updated: Jun 29, 2026
Powered by CVE Watchtower

🔴 Live Critical Threats

  • CVE-2026-55500CVSS 9.9
    ## Summary The `/api/settings/database` endpoint allows full database export (containing all credentials,...
  • CVE-2026-54496CVSS 9.3
    ### Summary A soundness vulnerability in the variable-base scalar multiplication gadget of...
  • CVE-2026-55615
    Neo4jChatAgent passes LLM-generated Cypher queries straight to the Neo4j driver with no...
  • CVE-2026-57572CVSS 10.0
    Crawl4AI is an open-source LLM-friendly web crawler and scraper. Prior to 0.9.0,...
  • CVE-2026-57571CVSS 9.6
    Crawl4AI is an open-source LLM-friendly web crawler and scraper. Prior to 0.9.0,...
  • CVE-2026-34038CVSS 9.9
    Coolify is an open-source and self-hostable tool for managing servers, applications, and...
  • CVE-2026-54769CVSS 10.0
    ### Advisory Details **Title**: Sandbox Escape to Remote Code Execution via Incomplete...
  • CVE-2026-54760
    # SQLChatAgent `_validate_query` dangerous-pattern regex is bypassable via quoted/commented/qualified function names ##...
  • CVE-2026-53486CVSS 9.1
    ### Impact When extracting an archive to a directory, a crafted archive...
  • CVE-2026-9181CVSS 9.8
    ArcGIS Server contains a directory traversal vulnerability. An unauthenticated attacker could exploit...
Powered by CVE WATCHTOWER

Our Websites
  • Penetration Testing Tools
  • The Daily Information Technology
  • Daily CyberSecurity

    • About SecurityOnline.info
    • Advertise with us
    • Announcement
    • Contact
    • Contributor Register
    • Login
    • About SecurityOnline.info
    • Advertise on SecurityOnline.info
    • Contact Us

    When you purchase through links on our site, we may earn an affiliate commission. Here’s how it works

    • Disclaimer
    • Privacy Policy
    • DMCA NOTICE
    • Linkedin
    • Twitter
    • Facebook
    • Youtube
    © 2017 - 2026 Daily CyberSecurity. All Rights Reserved.