Questions tagged [libc]

The C standard library consists of a set of sections of the ISO C standard which describe a collection of headers and library routines used to implement common operations, such as input/output and string handling, in the C programming language.

The C standard library consists of a set of sections of the ISO C standard which describe a collection of headers and library routines used to implement common operations, such as input/output and string handling, in the C programming language.

There are many implementations of libc with different resource requirements, security goals, etc. With a typical tool chain the libc, compiler and OS work together to achieve some ISO, Posix or custom features/standards. Some libc implementation are only a subset of the ISO standard, but still full featured enough to be used in many applications.

Specific libc tags:

  • - the full Gnu Libc found on most GCC installs.
  • - a smaller micro-controller libc for resource constrained devices
  • - Android libc
  • - unhosted libc
  • - more modern lighter foot print libc

Websites

See also:

Do not confuse with , which is for the C++ programming language.

1076 questions
0
votes
1 answer

Assembly Language modify input string;

I am trying to write an assembly program that take in a string from the file text.txt. Then the program encoded the string in ROT13 and using printf to display the result. However, It seem like i failed to read the file and get put in an infinite…
Carlos Frank
  • 167
  • 2
  • 13
0
votes
0 answers

Assembly language segmentation fault

When run my assembly program keeps producing segmentation faults at the end. The program is suppose to print out the numbers from 1-100 and replace all numbers divisible by 5 and fifties by the word "Fizz". I have tried various options but I still…
Carlos Frank
  • 167
  • 2
  • 13
0
votes
1 answer

Python can't load libc when importing xfsm module

I'm trying to write Python code to manipulate Xerox FST files, and I've installed the Python bindings for libxfsm and the XFSM library available through http://fsmbook.com. I'm running 64-bit Ubuntu. The installation goes fine, but when I try to…
Logan R. Kearsley
  • 682
  • 1
  • 5
  • 19
0
votes
1 answer

os x 32-bit printf from assembler

I'm back again - thanks to the kind folks here, especially @Jester and @PeterCordes, I have three out of my four target platforms working. I have Win 32 and Win 64 working, and I have OS X 64 working, but I can't seem to make OS X assembly work in…
querist
  • 614
  • 3
  • 11
0
votes
1 answer

List the FULL path of all the subfolders and files inside a directory one per line in GCC

I want to display the full path of all subfolders and files of a directory one per line in GCC. The existing questions don't provide a solution for listing the full path. For eg, If I have a directory /root/abc which contains two files(a.txt and…
pseudonym
  • 31
  • 9
0
votes
2 answers

Only link certain symbols from a library

I am developing an embedded system with GCC, and would like to only use a few symbols from libc. For instance, I would like to use the basic memcpy, memmove, memset, strlen, strcpy, etc. However, I would like to provide my own (smaller) printf…
FazJaxton
  • 7,544
  • 6
  • 26
  • 32
0
votes
1 answer

How to statically link libc while keeping dynamic loading?

I want to build a statically linked application that could use dynamically loadable plugins. The problem is that I can't get rid of the libc.so dependency. I'm using musl libc and compiling like …
0
votes
1 answer

Use a library from a newly installed glibc in conjunction with --rpath

I built a new glibc in ~/glibc/git/glibc/build. I know that I can use it to start programs after embedding a path to it and and a corresponding path to loader like this: $ gcc main.c -o main -Wl,--rpath=$HOME/glibc/git/glibc/build…
user1042840
  • 1,925
  • 2
  • 16
  • 32
0
votes
0 answers

Segfault libc Android

I'm using a custom ROM for a Galaxy S5 (KLTE) Fusion 6.0. It's a wonderful ROM but I keep experiencing random soft reboots. I'm trying desperately to track down whatever is causing them. I have a logcat of the issue occurring but I don't know what…
Geofferey
  • 2,862
  • 6
  • 21
  • 24
0
votes
1 answer

Java set local ip address without changing code

I have a server to which we will be adding an additional IP address. The server is a CentOS VPS running on the OpenVZ virtualization platform. What I would like to do is introduce the new address without affecting the existing Java programs, all the…
Rodney
  • 2,642
  • 1
  • 14
  • 15
0
votes
1 answer

Getting libc.so file not found error in python

Traceback (most recent call last): File "test.py", line 391, in main() File "test.py", line 385, in main find_rop_gadgets('libc.so') File "test.py", line 78, in find_rop_gadgets e = elf.ELF(path) File…
Joy
  • 11
  • 1
  • 2
0
votes
0 answers

Linking libcurl with static libc

I am trying to compile a C program while linking dynamically libcurl and statically libc. My Makefile looks like: SRC=myprogram.c LDFLAGS+= -static libc.a -static-libgcc -Wl,-static -lc LDFLAGS+= -linfluxdb -lcurl -lm -ljson-c I need to link…
0
votes
2 answers

Mageia-Linux x86_64 Error: exec shell C code with static compilation

I am trying to exec a shell in C using the following code: #include int main(){ char *name[2]; name[0] = "/bin/sh"; name[1] = NULL; execve(name[0],name,NULL); return(0); } To compile this, I am using the gcc -static…
0
votes
2 answers

What's wrong with Genymotion?

I am using Genymotion Android emulator. On Android 4+ real device my app works fine, but when I use emulator I get this: 0-03 10:59:30.747 1562-1562/eu.mdaa E/OpenGLRenderer: Getting MAX_TEXTURE_SIZE from GradienCache 10-03 10:59:30.755…
AlexMomotov
  • 7,418
  • 8
  • 24
  • 34
0
votes
0 answers

Function "creat" in libc

I'm trying to build RTEMS (www.rtems.org) for my MicroBlaze processor, but I have an error that I can't fix. When using autoconf, the file conftest.c is generated and requires function creat() in libc. But, libc does not have the function creat(),…