Quantcast
Channel: Active questions tagged gcc - Stack Overflow
Viewing all articles
Browse latest Browse all 22250

How to link specific modules from libc?

$
0
0

I’m wondering is it possible to link only a specific module from libc, lets say - string.h.

I’m creating a C program that is being statically linked, and needs to be as tiny as possible (memory wise). I want to link only a specific module (since I don’t use the other modules in my code), but instead the whole libc library is being linked and the executable ends up being huge.

I hope someone can shed some light on this topic because I can’t really find the answer.

PS: I’m using gcc to compile my program.


Viewing all articles
Browse latest Browse all 22250

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>