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
2 answers

What is the difference between setpgrp and tcsetpgrp

int tcsetpgrp(int fildes, pid_t pgid_id); and int setpgrp(void); I don't really understand difference and purpose of this two functions. Of course man page has been previously read. But I still don't understand purpose and use of this…
0
votes
0 answers

libc - standard IO - how its used

I wonder how the libc.so.6 is handled in memory when a program includes it . I understand its a dynamic lib file and only stored once but I was really surprised how huge this file is. This syntax directs the stream to myoutput.txt objdump -d…
java
  • 1,165
  • 1
  • 25
  • 50
0
votes
2 answers

Raspberry Pi Libc corrupted

My Raspberry Pi will not install anything anymore, as it keeps on complaining about a half-installed libc6. For example, when I try to install g++ 4.7: pi@raspberrypi ~/workspace $ sudo apt-get install g++-4.7 Reading package lists... Done Building…
Dirk
  • 2,094
  • 3
  • 25
  • 28
0
votes
0 answers

Unable to display arc gis Maps in Android

I want to display few ArcGIS map on android based on selection one at a time (from Sample available in ArcGIs Website) but I fail. Error I am getting is: Log Tag:dalvikvm Log Message:VM aborting Log Tag:libc Log Message:Fatal signal 6…
0
votes
0 answers

when using fopen with thread the virtual memory will increase

on my linux(CentOS dis). when I create a POSIX thread by pthread,and pass a callback fucntion(thread function),in that function,I use FILE* fp = fopen(); will make the per thread's virtual memory increase to 80MB,yes,when I create 4 threads,the…
zhou
  • 19
  • 2
0
votes
0 answers

How to know if a system or library call may cause my thread to be suspended?

I am wondering if there is somewhere a list of all the system and library calls that may cause the calling thread to be suspended (putted in a wait queue) ? Note: man pages are not always explicit about this, see for example man 2 read
Manuel Selva
  • 18,554
  • 22
  • 89
  • 134
0
votes
1 answer

Segmentation fault in Sidekiq/libc.so6

I'm getting a sporadic segfault in my Rails app. It might be a problem coming from Sidekiq since they've been occurring randomly when jobs are being processed, but there's not much else to go on since the segfault is originating in…
Gloria
  • 3
  • 3
0
votes
0 answers

Why cstdio includes stdio.h?

I've found std lib header cstdio (libcxx implementation line 100) to include stdio.h. So now clang (using via libclang - C API) diagnostics reports that stdio.h is not found (in some device specific environment which i'm configuring). It seems to be…
4ntoine
  • 19,816
  • 21
  • 96
  • 220
0
votes
0 answers

GCC: Difference between buildroot gcc and precompiled gcc (installed with APT)?

I'm trying to make custom binaries for initrd for x86 system. I took generic precompiled Debian 7 gcc (version 4.7.2-5) and compiled kernel with it. Next step was to make helloworld program instead of init script in initrd to check my development…
Oleg Olivson
  • 489
  • 2
  • 5
0
votes
2 answers

uClibc vfork() is causing segmentation fault

I am using armv7 for openwrt development and facing a segfault caused by vfork. I have wrote a small test program with the following segments: ... pid_t child_t; if((child_t = vfork()) < 0) { printf("error!\n"); …
dear_tzvi
  • 745
  • 6
  • 19
0
votes
2 answers

Python SIGTERM handler is not activated in subprocess

I want to gracefully release some expensive system resource in my code with event handler. The problem is that the event handler is registered in a forked sub-process (yes, I have to put the event handler there in sub-process, since the resource is…
Summer_More_More_Tea
  • 12,740
  • 12
  • 51
  • 83
0
votes
0 answers

Do Android apps have a deep copy of libc?

In this presentation in slide 5 the libc.so is supposed to be part of the sandbox of every application. However for example in this paper it is stated that the libc is dynamically linked, which means that only during runtime of an application the…
JoachimR
  • 5,150
  • 7
  • 45
  • 50
0
votes
1 answer

Fixing libc.so.6 unexpected reloc type 0x25

I'm trying to install gcc4.9 on a SUSE system without an internet connection. I compiled gcc on an Ubuntu machine and installed it into a prefix, then copied the prefix folder to the SUSE machine. When I tried to run it gcc complained about not…
chew socks
  • 1,406
  • 2
  • 17
  • 37
0
votes
1 answer

ioctl prototype in solaris libc

I had a program issue with the following stack. 6600: ora_d006_LOOKUP ffffffff7addbbd0 __systemcall6 (3, ffffffff7d300440, 0, ffffffff7adc1268, d, fff7) + 24 ffffffff7adcba74 pthread_sigmask (2000, 0, 0, 0, ffffffff7d300200, d) + 1c4 …
zhihuifan
  • 1,093
  • 2
  • 16
  • 30
0
votes
2 answers

C99-specific scanf specifier not working with GCC 3.3.2 -- why not?

The "hh" specifier was introduced in C99, and I am using this specifier in my code. (Code example to follow...) My compiler is GCC 3.3.2, my OS is Solaris 8, and my C library is SUNW libc v1.21. The "hh" specifier has no effect when this code…