Skip to content
November 8, 2026
  • Bluesky
  • Facebook
  • Linkedin
  • Mastodon
  • RSS
  • Twitter
  • Youtube

Daily CyberSecurity

Zero-hour alerts. Unmatched analysis.

Primary Menu
  • Home
  • CVE Data
    • CVE Watchtower
    • Top Exploited CVEs
    • CVE Stats by Vendor
    • Q2 2026 Report
    • CVE Alerts
    • CVE Alert Settings
    • Pricing
  • Cyber Criminals
  • Data Leak
  • Free Tools
    • CVSS 3.1 Calculator
    • Certificate Viewer
    • DNS Lookup
    • Encoder & Hash Generator
    • IP / Subnet Calculator
    • Whois Lookup
  • Linux
  • Malware
  • Vulnerability
  • Submit Press Release
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

 

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

CVE ALERTS
📈

EPSS Spike Alerts
Catch risk spikes before they make headlines.

🎯

Custom EPSS/CVSS
Set score thresholds to effectively filter noise.

🛡️

Exploit Intel
Real-world exploit signals beyond the KEV catalog.

🐙

GitHub Issues
Auto-create alert tickets without duplication.

📬

Weekly Digest
Clean summaries, eliminating email spam.

🏷️

Watchlist Groups
Tag vulnerabilities by team (Infra/AppSec/SOC).

🔀

Smart Routing
Route chat channels based on severity levels.

🚨

RBP Tracker
Early warning detection and tracking system.

Subscribe – $7/mo or try free for 14 days →

🚨 Active Exploits in the Wild

  • CVE-2026-123158CVSS 8.1
    sshd in OpenSSH before 10.6p2 on Linux, when musl libc is used without PAM, lacks a workaround for...
    Admin intel📅 Updated: Nov 6, 2026
  • CVE-2026-19868CVSS 7.5
    An authentication enforcement vulnerability in SonicOS SSLVPN service may allow a user with valid credentials for an alternate...
    CISA KEV📅 Added to KEV: Nov 6, 2026
  • CVE-2026-120422CVSS 8.9
    Sogou Input Method for Windows contains a vulnerability in the configuration retrieval mechanism of its SGTool.exe component. The...
    Admin intel📅 Updated: Nov 5, 2026
  • CVE-2026-102895CVSS 9.8
    GPUStack is an open-source GPU cluster manager for AI model serving and GPU instance provisioning. Prior to 2.2.0,...
    Watchtower Verified📅 Updated: Nov 5, 2026
  • CVE-2026-115732CVSS 9.0
    Incorrect authorization in the certificate-name matching of trapperkeeper-authorization, as used by Puppet Server, in the affected products, allows...
    Admin intel📅 Updated: Nov 4, 2026
  • CVE-2026-98432CVSS 9.8
    In the Linux kernel, the following vulnerability has been resolved: ipv4: free inet_opt and ireq_opt after an RCU...
    Admin intel📅 Updated: Nov 4, 2026
  • CVE-2026-107441CVSS 8.8
    An out-of-bounds write vulnerability in the CGI program of Zyxel GS1900-24E firmware versions through 2.90(AAHK.2)C0 could allow an...
    Admin intel📅 Updated: Nov 4, 2026
  • CVE-2019-25779CVSS 7.5
    The Diarise theme for WordPress is vulnerable to Directory Traversal in all versions up to, and including, 1.5.9....
    Watchtower Verified📅 Updated: Nov 4, 2026
Powered by CVE Watchtower

Critical Vulnerabilities

  • CVE-2026-49121CVSS 9.2
    AI Tensor Engine for ROCm (AITER) through 0.1.14 contains an unauthenticated remote code execution vulnerability in the MessageQueue.recv()...
    📅 Updated: Nov 8, 2026
  • CVE-2026-48242CVSS 9.2
    Open ISES Tickets before 3.44.2 contains hardcoded MySQL database connection credentials (host, username, password, database name) in import_mdb.php....
    📅 Updated: Nov 8, 2026
  • CVE-2026-48241CVSS 9.2
    Open ISES Tickets before 3.44.2 contains hardcoded MySQL database credentials in loader.php (a public-facing database utility) that are...
    📅 Updated: Nov 8, 2026
  • CVE-2026-47117CVSS 9.3
    OpenMed before 1.5.2 contains a remote code execution vulnerability in the PII privacy-filter model loading path. The privacy-filter...
    📅 Updated: Nov 8, 2026
  • CVE-2026-47103CVSS 9.3
    Python StateMachine versions 3.0.0 before 3.2.0 contains a remote code execution vulnerability that allows attackers to execute arbitrary...
    📅 Updated: Nov 8, 2026
  • CVE-2026-43633CVSS 9.5
    HestiaCP versions 1.9.0 through 1.9.4 contain a deserialization vulnerability in the web terminal component caused by a session...
    📅 Updated: Nov 8, 2026
  • CVE-2026-42796CVSS 9.2
    Arelle before 2.39.10 contains an unauthenticated remote code execution vulnerability in the /rest/configure REST endpoint that accepts a...
    📅 Updated: Nov 8, 2026
  • CVE-2026-41947CVSS 9.3
    Dify before version 1.14.2 contains an authorization bypass vulnerability that allows authenticated editor users to set and enable...
    📅 Updated: Nov 8, 2026
Powered by CVE Watchtower

Daily CyberSecurity

  • About SecurityOnline.info
  • Advertise with us
  • Announcement
  • Contact
  • Contributor Register
  • Login
  • Disclaimer
  • DCMA
  • Privacy Policy
  • 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

  • CVE Watchtower
  • CVE Statistics by Vendor 2026
  • Q3 2026 Report
  • Top Exploited CVEs
  • Bluesky
  • Facebook
  • Linkedin
  • Mastodon
  • RSS
  • Twitter
  • Youtube
© 2017 - 2026 Daily CyberSecurity. All Rights Reserved.