2

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.

Tal Avraham
  • 300
  • 1
  • 6

0 Answers0