Category "gcc"

How gcc decide to use dynamics library when creating executable?

I am creating an executable with this: gcc elliptical.o -Llibs -lhfcal -o elliptical In my libs sub folder there are: libhfcal.a libhfcal.so files. My purpos

ELF file variable addresses of C structure in debug info

I have .elf file. I am trying to learn symbol address. I could find main variable addresses with many ways. I used pyelftools, nm.exe, objdump.exe, readelf.exe.

GCC, constant tables and .rodata

I have a strange problem with gcc and constants and .rodata Let's assume: typedef const struct { const char *a; } data_t; typedef const struct { const dat

Vector in C++ module causes useless Bad file data GCC output

TL;DR: GCC 11.2.0 (image f7ea55625e09) + C++20 + <vector>'s std::vector<anything> cause useless output. How to get out something I can work with? Co

configure: error: Fortran compiler cannot create executables

I'm trying to install Quantum ESPRESSO on my computer and have run into an issue when using the ./configure command in the unpacked directory. $ ./configure ch

LuaJIT and GCC: number of cores

BACKGROUND: I read several articles about performance benchmarks between LuaJIT and C-language. There were different conclusions, so I tried to compare the spee

Why is calling snprintf() so slow?

Our internal program is written in C and makes extensive use of snprintf() for many pieces, and I noticed that during debugging with perf record/report, it's sp

Compile and run assembly on macbook

I'm taking a course on computer structure and I'm lost. I was given the following file: Hello.s: #This is a simple "Hello World!" program .section .rodat

How to covert the address from KCOV output to filename:lineno using addr2line?

I want to use KCOV (code coverage for fuzzing) in the Linux kernel to record the coverage of certain system calls. I have enabled the corresponding kernel conf

Looking to use a library with example code for Open Quantum Safe

So I am trying to use following library: Open Quantum Safe I am using windows linux subsystem, so I followed the linux setup. I think I followed all the steps c

DCDO and FRAME PUSH instruction in Gnu GCC assembler syntax

I am importing arm asm assembly code to GNU assembler and not able to find the instruction for DCDO and FRAME PUSH that are used in keil(arm asm).

object file not PIC showing relocatable?

I have a small library, and I build it with gcc without -fPIC option, I think this would mean that the generated object file will not be relocatable, but when I

Why is the XOR swap optimized into a normal swap using the MOV instruction?

While testing things around Compiler Explorer, I tried out the following overflow-free function for calculating the average of 2 unsigned 32-bit integers: uint3

g++: error: unrecognized '-std=c++17' (what is g++ version and how to install)

I am working on RHEL 7.5 and trying to compile a uWebSocket (This exaple) code. I clone the project and open it. When I start make on Makefile I got this error;

"g++: error: unrecognized command line option ‘-std=gnu++14’" with gcc version 9.3.0

I have the CentOS Linux release 7.9.2009 (Core) running in the VirtualBox, which was build by the Vagrant 2.2.19 and the Ansible 2.9.25 installed all the depede

OpenVAS libgvm_util.so: undefined reference to `MQTTClient_`

Have some troubles in compiling from source https://github.com/greenbone/openvas.git cmake was done successfully, but make failed with: /usr/bin/ld: /opt/gvm/li

Why does GCC include an "empty" XOR

I have following piece of code: typedef struct { int x; int y; int z; int w; } s32x4; s32x4 f() { s32x4 v; v.x

Go 1.13: gcc-5 not in PATH

I've installed Go 1.13.4 in Debian Linux 10 using brew, package golang (previously I've removed golang-1.11 installed via apt). It follows brew info output. $

What are the examples of non-ISO practices, which are not found by -pedantic?

https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html : Some users try to use -Wpedantic to check programs for strict ISO C conformance. They soon find that

how to find the dependencies of a source code?

Let say I have a simple c-library project, the layout is as follows - src/ - square_root.c - log.c - power.c - newton_method.c - include