View gcc default macro definition

Basic commands Execute the gcc -E -dM test.c command to view the default macro definition of gcc on the current system, where test.c is a c source file with empty content. Extension Embedded gcc can add CPU parameters to see the default macro definition of gcc under the current compilation configuration, for example, execute the […]

GCC + Vscode build nRF52xxx development environment

Use GCC + Vscode to build nRF52xxx development environment under Windows… by Jinchen Foreword Recently, I encountered project requirements that required the use of Nordic’s nRF52xxx chip. I still remember the nRF52832 study notes I wrote when I first started writing blog posts. Now I see that there is no logic in the notes at […]

Build Makefile+OpenOCD+CMSIS-DAP+Vscode arm-none-eabi-gcc project template

Embedded-GCC-Template third-party resource collection STM32F407-GCC-Template Arm-none-eabi-gcc + Makefile + OpenOCD + CMSIS-DAP + Vscode project template 1. Software and hardware used to build this environment 1) Windows or Linux (this article focuses on Windows) 2) JLink, Daplink, Wch-Link programmer 3) GNU Arm Embedded Toolchain cross-compiler 4) Mingw-w64 GCC for Windows 64 5) Debug debugging tool […]

Yunchen Shooting Range Medium_Socnet The internal network is docker. There is no site agent. There is no privilege escalation method for gcc. Solve the problem that ldd is too high and cannot execute exp. Specify the so file.

First, we can scan the current intranet through arp-scan. But I don’t know why it can’t be scanned out. Then we can use fscan to get the survival The scan here generally only opens port 22. So we use nmap for information collection scanning nmap -sS -sV -A -p- 172.25.0.13 Perform version service scanning through […]

[Linux] Station 8: Use of gcc and g++

Article directory 1. Solve the problem of sudo command 2. Linux compiler-gcc/g++ 1.Usage of gcc 2.Usage of g++ 3. gcc compilation and linking process 1. Preprocessing 2. Compile (generate assembly) 3. Assembly (generating machine-readable code) 4. Link (generate executable file or library file) 5.The meaning of some options 4. Library 1. Some knowledge about libraries […]

gcc: C++: COMDAT; linkonce

Common Data https://en.wikipedia.org/wiki/Relocatable_Object_Module_Format COMDAT – (C2h/C3h) Initialized common data TIS 1.1 C2H/C3H COMDAT Initialized Communal Data Record https://refspecs.linuxfoundation.org/elf/TIS1.1.pdf The purpose of the COMDAT record is to combine logical blocks of code and data that may be duplicated across a number of compiled modules. These two have the same meaning, both are “common data”, which are […]

The story behind GCC & address allocation of C program constant variables

Table of Contents 1. Use gcc to generate static libraries and dynamic libraries Example 1 1.Create a directory 2.gcc compiles and obtains the .o file 3. Create a static library 4. Use static libraries 5. Verify the usage characteristics of static libraries 6. Create a dynamic library 7. Use dynamic libraries 8. Comparison of static […]

The story behind GCC; allocation of constant variables in C programs

? 1. Learn and master the compilation and assembly process of executable programs. The learning tasks are as follows: read, understand and study the materials “Using gcc to generate static libraries and dynamic libraries.pdf” and “Generation and use of static library .a and .so library files.pdf”, please do so under the Linux system (Ubuntu) Copy […]

The story behind GCC & address allocation of C program constant variables

1) Read, understand and study the materials “Using gcc to generate static libraries and dynamic libraries.pdf” and “Generation and use of static library .a and .so library files.pdf”, please copy them faithfully under the Linux system (Ubuntu) Again. To learn the compilation and assembly process of executable programs, you can practice it under the Linux […]

Gcc related operating principles and program memory allocation issues under buntu and stm32

This article mainly introduces the program memory allocation problem under Ubuntu and stm32, as well as the address allocation problem of heap, stack, global, local and other variables. Table of Contents Preface 1. Task requirements 2. Experimental process 2.1 Learn and master the compilation and assembly process of executable programs 2.1.1gcc generates executable dynamic static […]