Skip to main content
Filter by
Sorted by
Tagged with
1 vote
1 answer
1k views

I am currently learning assembler for x86 with att syntax. Over the past time I have already written exercise programs without dependencies. Now I wanted to try writing a shared shared-library, as ...
cediwelli's user avatar
  • 369
0 votes
0 answers
2k views

I am trying to compile my assembly code global main extern printf section .data msg db "Testing %i...", 0x0a, 0x00 section .text main: push ebp mov ebp, esp push 123 ...
user avatar
0 votes
1 answer
2k views

I am running a program with a set of custom libraries as follows: /path/to/my/ld-linux-x86-64.so.2 --library-path /path/to/my/libs /path/to/my/executable This works great for most of the programs I ...
Ian's user avatar
  • 348
1 vote
1 answer
1k views

According to this overview in order to compile Y2038 conform old code, we just need to add the preprocessor macro __USE_TIME_BITS64 to gcc, but that does not seem to work on an ARMv7 board with Debian ...
JohnnyFromBF's user avatar
  • 10.2k
1 vote
1 answer
2k views

#include <stdio.h> #include <string.h> size_t ft_strlcpy(char *dst, const char *src, size_t dstsize) { unsigned int i; unsigned int dst_len; i = 0; dst_len = ...
jyoung's user avatar
  • 39
0 votes
1 answer
460 views

Is there any way to find the address of a global variable in libc that hasn't been linked into the executable (therefore not in the got/plt)? I'd like to access the __environ global variable in my ...
codegen's user avatar
  • 118
0 votes
1 answer
2k views

I need to use gcc-arm-linux-gnueabi version 6.5, along with a version of libc that came out around the same period (I believe is libc-2.26). My host system is Ubuntu 18.04. If I go with just a simple ...
Alexis Nicole's user avatar
0 votes
1 answer
946 views

i run this command for installing afl but got this error :slight_smile: cargo install --force afl --verbose Updating crates.io index Installing afl v0.12.2 Compiling libc v0.2.119 Compiling semver v1....
kayvan jam's user avatar
1 vote
1 answer
982 views

I am working on a project using the Kendryte K210 which is a 64-bit duel-core RISC-V machine. I am using the Kendryte GNU toolchain and the starting point was the Kendryte standalone SDK. I am ...
Mark Watson's user avatar
1 vote
1 answer
344 views

I came across an interesting bug in our code recently. We parse time-stamps in the format %Y-%m-%dT%H:%M:%S using strptime() A user entered a 2 digit year by mistake and a very wrong time-stamp was ...
Bruce Adams's user avatar
  • 5,819
0 votes
0 answers
612 views

Sample code (t667c.c, taken from here): #include <stdio.h> #include <time.h> int main(void) { struct timespec ts; timespec_get(&ts, TIME_UTC); char buff[100]; strftime(...
pmor's user avatar
  • 6,757
1 vote
2 answers
1k views

Scenario: $ echo "#include <uchar.h>" | gcc -xc - -std=c11 -pedantic -Wall -Wextra <stdin>:1:10: fatal error: uchar.h: No such file or directory compilation terminated. $ gcc --...
pmor's user avatar
  • 6,757
4 votes
4 answers
1k views

I recently upgraded my OS from Debian 9 to Debian 11. I have a bunch of servers running a simulation and one subset produces a certain result and another subset produces a different result. This did ...
user3856370's user avatar
0 votes
1 answer
63 views

Sample code: void accept(int x); int main(void) { accept(0); return 0; } Invocations: $ gcc t719.c -std=c11 -pedantic -Wall -Wextra <nothing> $ clang t719.c -std=c11 -pedantic ...
pmor's user avatar
  • 6,757
0 votes
0 answers
614 views

I've compiled cpuid2.s to cpuid2.o by as cpuid2.s -o cpuid2.o -gstabs Firstly I linked it by ld -o cpuid2 cpuid2.o -lc but a message says ./cpuid2:no such file or directory when I executed it (which ...
akaLIAN313's user avatar
0 votes
0 answers
34 views

I want to find the size of an array without the standard library(libc). While looking at the musl source code I couldnt find where sizeof() was located.
user avatar
0 votes
2 answers
1k views

How to extract and compare the libc versions at runtime with the following restrictions? stable solution (commands output parsing is discarded as this may vary) should not rely on executing external ...
Alexis's user avatar
  • 641
6 votes
4 answers
17k views

Error Trace: ImportError: /lib/arm-linux-gnueabihf/libc.so.6: version `GLIBC_2.33' not found (required by /home/pi/.local/lib/python3.7/site-packages/grpc/_cython/cygrpc.cpython-37m-arm-linux-...
Hisan's user avatar
  • 2,683
0 votes
0 answers
218 views

I'm trying to install the paraview connector to Nvidia omniverse. Once I load the plugin, it crashes with the following error. It looks like some issues with libc.so or Qt5. But I do not know what ...
Coconut's user avatar
  • 184
1 vote
1 answer
3k views

Today, when I use conda zlib to compile a binary, I encountered the error Undefined reference to memcpy@GLIBC_2.14. .../x86_64-conda-linux-gne/bin/ld: ...envs/myenv/lib/libz.so: undefined reference to ...
dream's user avatar
  • 11
0 votes
1 answer
130 views

I'm using tcc on sabotage. I use below to link LZMA to dietlibc (the start.o and libc.a from dietlibc are in current path): tcc -nostdlib start.o LzmaUtil.o Alloc.o LzFind.o LzmaEnc.o LzmaDec.o 7zFind....
Chenrui Yang's user avatar
1 vote
1 answer
1k views

I have seen the various standard cures and none of them work. Basic problem: sudo apt-get --fix-broken install Reading package lists... Done Building dependency tree Reading state ...
Samantha Atkins's user avatar
2 votes
1 answer
2k views

I've been writing some x64 assembly on linux - exactly what it is is not relevant - and I've come across a strange problem. In my assembly code, I've declared printf as an external label, and call it ...
nekodjin's user avatar
  • 165
0 votes
1 answer
114 views

Can the following code: float f = sinf(0.5f); be optimized to the following code (actually pseudocode to give an idea): float f = 0x1.eaee88p-2f; feraiseexcept(FE_INEXACT); The same principle for ...
pmor's user avatar
  • 6,757
4 votes
3 answers
802 views

Usually nextafter is implemented in the following way: double nextafter(double x, double y) { // handle corner cases int delta = ((x > 0) == (x < y)) ? 1 : -1; unsigned long long ...
pmor's user avatar
  • 6,757
0 votes
2 answers
1k views

I am trying to call srand function from libc library using CDLL, but I got a Segmentation fault error before actually calling srand. My code looks like this: from ctypes import CDLL import time libc =...
Mocanu Gabriel's user avatar
2 votes
1 answer
2k views

I'm trying to debug my C code in vscode, and I'm having some problems. I'm using ubuntu and have gcc and gdb debugger installed. when I start debugging my code and reach to a line with `printf` or `...
Reza Masoumi's user avatar
1 vote
1 answer
918 views

I was trying to install devtoolset-8 in my slave node with no active internet connection running centos7. I am using all .rpm packages required as dependencies. During installation through rpm -ivh * ...
Pradipta Kumar Das's user avatar
-1 votes
1 answer
133 views

I like to run this command to look for function names similar to sendfile, send, write writev on my some system library or kernel. command nm -D /usr/lib/libopenal.so.1 //or T option But I don't know ...
user786's user avatar
  • 4,440
0 votes
1 answer
535 views

I'm new to perf, and I'm trying to use it to analyse my programme. and I got this when running perf top: PerfTop: 296 irqs/sec kernel:62.8% exact: 0.0% [1000Hz cycles:ppp], (all, 6 CPUs) -----...
陈泽霖's user avatar
  • 175
0 votes
1 answer
228 views

I'll try to summarize but it's gonna be complicated. I'm having an operating system course in my university, and i have a lab work to do. I'm working in Rust (the lab work is said to be doable in any ...
Carryboo's user avatar
0 votes
1 answer
1k views

I'm trying to rewrite the printf function. To quickly summarize my approach, I've created a struct that contains the va_list and some other integer variables to contain information about what flags ...
António Abranches Pinto's user avatar
1 vote
1 answer
2k views

I use window10 with WSL, linux version is ubuntu20.0.4 When I use riscv64-unknown-elf-gcc -lc --verbose to check some information, The log is as follows : Using built-in specs. COLLECT_GCC=riscv64-...
Ericccccccc's user avatar
0 votes
1 answer
2k views

According to clang's documentation, Clang supports a wide variety of C standard library implementations. But it lacks the information about how to actually use desired libc. For example, how to use ...
Anthony's user avatar
  • 2,117
5 votes
2 answers
8k views

I'm attempting to use gifsicle in a lambda function utilizing a Node.js 14.x runtime. Executing the function throws the following error: ERROR /opt/gifsicle: /lib64/libm.so.6: version `GLIBC_2.29' not ...
John Durand's user avatar
  • 2,024
3 votes
2 answers
1k views

I would like to build a C++ application which can be launched on all Linux systems having libc >= 2.31. On my build system (Ubuntu), I have libc 2.34. Here is my (empty) application: int main() { ...
ralvento's user avatar
0 votes
1 answer
4k views

I follow official Alpine Linux guide on aarch64 vm (installed from alpine-virt-...iso) but i can't find gcompat package: myvm:~# apk add gcompat ERROR: unable to select packages: gcompat (no such ...
4ntoine's user avatar
  • 20.6k
0 votes
2 answers
283 views

I'm writing a coding competition grader, in which I want to use gcc to compile a contestant's code and link it with only a restricted subset of C standard library functions. For instance, I only want ...
BearAqua's user avatar
  • 538
0 votes
1 answer
357 views

I would like to call an impl method on sending a SIGUSR1 signal. Consider the following example: use libc::SIGUSR1; use std::{thread, time}; struct Foo { } impl Foo { fn show(&self) { ...
yellowhat's user avatar
  • 549
8 votes
2 answers
3k views

I recently found, that I can make Linux system calls from .NET relatively easy. For example, to see if I need sudo I just make a signature like this: internal class Syscall { [DllImport("libc&...
Harry's user avatar
  • 5,126
2 votes
1 answer
236 views

I am trying to compile the following components: appl - an application which links to a dynamic shared library (libwrapper.so) libwrapper.so - A library used by appl. This library invokes functions ...
m.divya.mohan's user avatar
1 vote
0 answers
764 views

When I execute Valgrind on Clion Editor, the following error shows up. /usr/local/bin/valgrind --tool=memcheck --xml=yes --xml-file=/private/var/folders/gq/r_j6y6112zlccqkwxp0rj_v00000gn/T/clion-...
hayashi-ay's user avatar
0 votes
0 answers
60 views

I'm using an aarch64 Linux computer, and my Android phone is also an aarch64 Linux system. When I compile a simple Hello World program and adb-pull it over to the Android phone and chmod +x it, I find ...
asdfasdf1001's user avatar
2 votes
1 answer
765 views

The source gets printed, but no open: or open64: gets printed. How to fix this? Thanks! /* gcc -o emload emload.c -ldl ./emload */ // emload.c #define _GNU_SOURCE #include <stdio.h> #include &...
Vadim Kantorov's user avatar
4 votes
1 answer
3k views

I have an python application that uses the FTDI driver library named: /usr/local/lib64/libftd2xx.so.1.4.22 When I run the application using libc 2.27, it works fine. When running it against libc 2.32 ...
isaac.hazan's user avatar
  • 3,894
0 votes
1 answer
1k views

How would one approach adding support for https://github.com/tianocore/edk2-libc, say I want to include stdio and use printf in my edk2 application? I followed StdLib/Readme.txt, and am able to ...
Mroov's user avatar
  • 23
5 votes
1 answer
1k views

I am compiling my Rust code to be used as a CLI. I want it installable on the widest possible range of x86_64-unknown-linux-gnu based systems, particularly Ubuntu's. I am using a docker base image ...
zino's user avatar
  • 1,542
0 votes
2 answers
2k views

Should I explicitly link my program or library against libc, when using libc symbols? i.e., cc ... -lc The question applies to the Makefile in case of a program, and both the Makefile and the pkg-...
alx - recommends codidact's user avatar
1 vote
1 answer
2k views

Why does this C code compile in C99? What should I read to learn more? I can't post unless I add more text so here's some nonsense text because I don't think there's anything else to say $ cat m.c #...
Eric Stotch's user avatar
5 votes
1 answer
195 views

According to the documentation: pub const unsafe extern "C" fn CMSG_SPACE(length: c_uint) -> c_uint However, if I compile fn main() { let _ = [0u8; libc::CMSG_SPACE(1) as usize]; } ...
beroal's user avatar
  • 397

1 2 3
4
5
23